yubikey-manager: 3.1 -> 4.0

Also, support Darwin properly
This commit is contained in:
Dan Peebles
2017-09-09 23:07:14 -04:00
parent 6a17c5a46c
commit 15502421c7
3 changed files with 18 additions and 10 deletions
+10 -6
View File
@@ -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 ];