about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/emv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/emv/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/emv/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/emv/default.nix b/nixpkgs/pkgs/development/python-modules/emv/default.nix
index f68729a42b62..c636af4d8cbd 100644
--- a/nixpkgs/pkgs/development/python-modules/emv/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/emv/default.nix
@@ -15,7 +15,15 @@ buildPythonPackage rec {
     hash = "sha256:1715hcba3fdi0i5awnrjdjnk74p66sxm9349pd8bb717zrh4gpj7";
   };
 
-  checkInputs = [ pytestCheckHook ];
+  postPatch = ''
+    # argparse is part of the standard libary since python 2.7/3.2
+    sed -i '/argparse==1.4.0/d' setup.py
+
+    substituteInPlace setup.py \
+      --replace "click==7.1.2" "click" \
+      --replace "pyscard==2.0.0" "pyscard"
+  '';
+
   propagatedBuildInputs = [
     enum-compat
     click
@@ -24,11 +32,9 @@ buildPythonPackage rec {
     terminaltables
   ];
 
-  # argparse is part of the standardlib
-  prePatch = ''
-    substituteInPlace setup.py \
-      --replace '"argparse==1.4.0",' ""
-  '';
+  checkInputs = [
+    pytestCheckHook
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/russss/python-emv";