about summary refs log tree commit diff
path: root/pkgs/tools/security/pass
diff options
context:
space:
mode:
authorZach <zach@hipcreativeinc.com>2021-06-12 18:03:38 -0500
committerZach <zach@hipcreativeinc.com>2021-06-12 18:03:38 -0500
commit52d50b0585908fbb1a49eb7c5b44f85c71e4d1be (patch)
tree62361cb02014a71b80b892cd838662066f4496c2 /pkgs/tools/security/pass
parentd51b663e07bd64b586009b72946823fd4b449282 (diff)
pass-import: 3.1 -> 3.2
Diffstat (limited to 'pkgs/tools/security/pass')
-rw-r--r--pkgs/tools/security/pass/extensions/import.nix33
1 files changed, 9 insertions, 24 deletions
diff --git a/pkgs/tools/security/pass/extensions/import.nix b/pkgs/tools/security/pass/extensions/import.nix
index 7fa9ce3177e5c..60775be180c85 100644
--- a/pkgs/tools/security/pass/extensions/import.nix
+++ b/pkgs/tools/security/pass/extensions/import.nix
@@ -9,37 +9,21 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "pass-import";
-  version = "3.1";
+  version = "3.2";
 
   src = fetchFromGitHub {
     owner = "roddhjav";
     repo = "pass-import";
     rev = "v${version}";
-    sha256 = "sha256-nH2xAqWfMT+Brv3z9Aw6nbvYqArEZjpM28rKsRPihqA=";
+    sha256 = "0hrpg7yiv50xmbajfy0zdilsyhbj5iv0qnlrgkfv99q1dvd5qy56";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "support-for-keepass-4.0.0.patch";
-      url = "https://github.com/roddhjav/pass-import/commit/86cfb1bb13a271fefe1e70f24be18e15a83a04d8.patch";
-      sha256 = "0mrlblqlmwl9gqs2id4rl4sivrcclsv6zyc6vjqi78kkqmnwzhxh";
-    })
-    # by default, tries to install scripts/pimport, which is a bash wrapper around "python -m pass_import ..."
-    # This is a better way to do the same, and takes advantage of the existing Nix python environments
-    # from https://github.com/roddhjav/pass-import/pull/138
-    (fetchpatch {
-      name = "pass-import-pr-138-pimport-entrypoint.patch";
-      url = "https://github.com/roddhjav/pass-import/commit/ccdb6995bee6436992dd80d7b3101f0eb94c59bb.patch";
-      sha256 = "sha256-CO8PyWxa4eLuTQBB+jKTImFPlPn+1yt6NBsIp+SPk94=";
-    })
-  ];
-
   propagatedBuildInputs = with python3Packages; [
     cryptography
     defusedxml
     pyaml
     pykeepass
-    python_magic  # similar API to "file-magic", but already in nixpkgs.
+    python_magic # similar API to "file-magic", but already in nixpkgs.
     secretstorage
   ];
 
@@ -52,20 +36,21 @@ python3Packages.buildPythonApplication rec {
   disabledTests = [
     "test_import_gnome_keyring" # requires dbus, which pytest doesn't support
   ];
-  postCheck = ''
-    $out/bin/pimport --list-exporters --list-importers
-  '';
 
   postInstall = ''
     mkdir -p $out/lib/password-store/extensions
-    cp ${src}/scripts/import.bash $out/lib/password-store/extensions/import.bash
+    cp ${src}/import.bash $out/lib/password-store/extensions/import.bash
     wrapProgram $out/lib/password-store/extensions/import.bash \
-      --prefix PATH : "${python3Packages.python.withPackages(_: propagatedBuildInputs)}/bin" \
+      --prefix PATH : "${python3Packages.python.withPackages (_: propagatedBuildInputs)}/bin" \
       --prefix PYTHONPATH : "$out/${python3Packages.python.sitePackages}" \
       --run "export PREFIX"
     cp -r ${src}/share $out/
   '';
 
+  postCheck = ''
+    $out/bin/pimport --list-exporters --list-importers
+  '';
+
   meta = with lib; {
     description = "Pass extension for importing data from existing password managers";
     homepage = "https://github.com/roddhjav/pass-import";