lol

python3Packages.pyscard: clean up apple_sdk stubs

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>

+9 -26
+8 -23
pkgs/development/python-modules/pyscard/default.nix
··· 2 2 lib, 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 - PCSC, 6 5 pcsclite, 7 6 pkg-config, 8 7 pytestCheckHook, ··· 10 9 stdenv, 11 10 swig, 12 11 }: 13 - 14 - let 15 - # Package does not support configuring the pcsc library. 16 - withApplePCSC = stdenv.hostPlatform.isDarwin; 17 - in 18 12 19 13 buildPythonPackage rec { 20 14 pname = "pyscard"; ··· 30 24 31 25 build-system = [ setuptools ]; 32 26 33 - nativeBuildInputs = [ swig ] ++ lib.optionals (!withApplePCSC) [ pkg-config ]; 27 + nativeBuildInputs = [ swig ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ]; 34 28 35 - buildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ]; 29 + buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ pcsclite ]; 36 30 37 31 nativeCheckInputs = [ pytestCheckHook ]; 38 32 ··· 41 35 substituteInPlace pyproject.toml \ 42 36 --replace-fail 'requires = ["setuptools","swig"]' 'requires = ["setuptools"]' 43 37 '' 44 - + ( 45 - if withApplePCSC then 46 - '' 47 - substituteInPlace src/smartcard/scard/winscarddll.c \ 48 - --replace-fail "/System/Library/Frameworks/PCSC.framework/PCSC" \ 49 - "${PCSC}/Library/Frameworks/PCSC.framework/PCSC" 50 - '' 51 - else 52 - '' 53 - substituteInPlace setup.py --replace-fail "pkg-config" "$PKG_CONFIG" 54 - substituteInPlace src/smartcard/scard/winscarddll.c \ 55 - --replace-fail "libpcsclite.so.1" \ 56 - "${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}" 57 - '' 58 - ); 38 + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' 39 + substituteInPlace setup.py --replace-fail "pkg-config" "$PKG_CONFIG" 40 + substituteInPlace src/smartcard/scard/winscarddll.c \ 41 + --replace-fail "libpcsclite.so.1" \ 42 + "${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}" 43 + ''; 59 44 60 45 meta = { 61 46 description = "Smartcard library for python";
+1 -3
pkgs/top-level/python-packages.nix
··· 13200 13200 13201 13201 pyscaffoldext-travis = callPackage ../development/python-modules/pyscaffoldext-travis { }; 13202 13202 13203 - pyscard = callPackage ../development/python-modules/pyscard { 13204 - inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; 13205 - }; 13203 + pyscard = callPackage ../development/python-modules/pyscard { }; 13206 13204 13207 13205 pyscf = callPackage ../development/python-modules/pyscf { }; 13208 13206