yubikey-manager: 3.1 -> 4.0
Also, support Darwin properly
This commit is contained in:
@@ -259,7 +259,7 @@ in {
|
||||
pythonPackages = self;
|
||||
};
|
||||
|
||||
pyscard = callPackage ../development/python-modules/pyscard { };
|
||||
pyscard = callPackage ../development/python-modules/pyscard { inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; };
|
||||
|
||||
pyside = callPackage ../development/python-modules/pyside { };
|
||||
|
||||
@@ -24234,11 +24234,15 @@ EOF
|
||||
};
|
||||
|
||||
# Fix the USB backend library lookup
|
||||
postPatch = ''
|
||||
libusb=${pkgs.libusb1.out}/lib/libusb-1.0.so
|
||||
test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
|
||||
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
|
||||
'';
|
||||
postPatch =
|
||||
let
|
||||
# This should really be in the stdenv somewhere
|
||||
soext = if stdenv.isLinux then "so" else if stdenv.isDarwin then "dylib" else throw "Unsupported platform";
|
||||
in ''
|
||||
libusb=${pkgs.libusb1.out}/lib/libusb-1.0.${soext}
|
||||
test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
|
||||
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pkgs.libusb ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user