diff --git a/overlays/default.nix b/overlays/default.nix index ca47ebb..5a3176b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -29,14 +29,28 @@ final: prev: { python312 = prev.python312.override { packageOverrides = _pyfinal: pyprev: { - wxpython = pyprev.wxpython.overrideAttrs (_old: { - version = "4.2.2"; + pyscard = pyprev.pyscard.overrideAttrs (_old: { + version = "2.2.0"; - src = final.fetchPypi { - pname = "wxPython"; - version = "4.2.2"; - hash = "sha256-XbywZQ9n/cLFlleVolX/qj17CfsUmqjaLQ2apE444ro="; + src = final.fetchFromGitHub { + owner = "LudovicRousseau"; + repo = "pyscard"; + rev = "refs/tags/2.2.0"; + hash = "sha256-yZeP4Tcxnwb2My+XOsMtj+H8mNIf6JYf5tpOVUYjev0="; }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'requires = ["setuptools","swig"]' 'requires = ["setuptools"]' + substituteInPlace setup.py --replace-fail "pkg-config" "$PKG_CONFIG" + substituteInPlace src/smartcard/scard/winscarddll.c \ + --replace-fail "libpcsclite.so.1" \ + "${final.lib.getLib final.pcsclite}/lib/libpcsclite${final.stdenv.hostPlatform.extensions.sharedLibrary}" + ''; + + preCheck = null; + disabledTests = [ ]; + }); }; }; @@ -44,14 +58,29 @@ final: prev: { python311 = prev.python311.override { packageOverrides = _pyfinal: pyprev: { - wxpython = pyprev.wxpython.overrideAttrs (_old: { - version = "4.2.2"; - src = final.fetchPypi { - pname = "wxPython"; - version = "4.2.2"; - hash = "sha256-XbywZQ9n/cLFlleVolX/qj17CfsUmqjaLQ2apE444ro="; + pyscard = pyprev.pyscard.overrideAttrs (_old: { + version = "2.2.0"; + + src = final.fetchFromGitHub { + owner = "LudovicRousseau"; + repo = "pyscard"; + rev = "refs/tags/2.2.0"; + hash = "sha256-yZeP4Tcxnwb2My+XOsMtj+H8mNIf6JYf5tpOVUYjev0="; }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'requires = ["setuptools","swig"]' 'requires = ["setuptools"]' + substituteInPlace setup.py --replace-fail "pkg-config" "$PKG_CONFIG" + substituteInPlace src/smartcard/scard/winscarddll.c \ + --replace-fail "libpcsclite.so.1" \ + "${final.lib.getLib final.pcsclite}/lib/libpcsclite${final.stdenv.hostPlatform.extensions.sharedLibrary}" + ''; + + preCheck = null; + disabledTests = [ ]; + }); }; };