diff --git a/pkgs/tools/security/pass/extensions/import.nix b/pkgs/tools/security/pass/extensions/import.nix index cbba33c1373a..0be41525ea28 100644 --- a/pkgs/tools/security/pass/extensions/import.nix +++ b/pkgs/tools/security/pass/extensions/import.nix @@ -1,5 +1,5 @@ { lib -, fetchFromGitHub +, fetchurl , fetchpatch , python3Packages , gnupg @@ -8,30 +8,23 @@ python3Packages.buildPythonApplication rec { pname = "pass-import"; - version = "3.2"; + version = "3.5"; - src = fetchFromGitHub { - owner = "roddhjav"; - repo = "pass-import"; - rev = "v${version}"; - sha256 = "0hrpg7yiv50xmbajfy0zdilsyhbj5iv0qnlrgkfv99q1dvd5qy56"; + src = fetchurl { + url = "https://github.com/roddhjav/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz"; + hash = "sha256-+wrff3OxPkAGu1Mn4Kl0KN4FmvIAb+MnaERcD5ScDNc="; }; - patches = [ - (fetchpatch { - name = "support-for-pykeepass-4.0.3.patch"; - url = "https://github.com/roddhjav/pass-import/commit/f1b167578916d971ee4f99be99ba0e86ef49015e.patch"; - hash = "sha256-u6bJbV3/QTfRaPauKSyCWNodpy6CKsreMXUZWKRbee0="; - }) - ]; - propagatedBuildInputs = with python3Packages; [ cryptography defusedxml + jsonpath-ng pyaml pykeepass python-magic # similar API to "file-magic", but already in nixpkgs. + requests secretstorage + zxcvbn ]; nativeCheckInputs = [ @@ -46,12 +39,12 @@ python3Packages.buildPythonApplication rec { postInstall = '' mkdir -p $out/lib/password-store/extensions - cp ${src}/import.bash $out/lib/password-store/extensions/import.bash + cp 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 PYTHONPATH : "$out/${python3Packages.python.sitePackages}" \ --run "export PREFIX" - cp -r ${src}/share $out/ + cp -r share $out/ ''; postCheck = ''