Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 443f1a43ef62
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d0d5884ba569
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 28, 2019

  1. Copy the full SHA
    22b2ccf View commit details
  2. Merge pull request #72156 from Mic92/pass-import

    passExtensions.pass-import: 2.3 -> 2.6
    fpletz authored Oct 28, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d0d5884 View commit details
Showing with 23 additions and 6 deletions.
  1. +23 −6 pkgs/tools/security/pass/extensions/import.nix
29 changes: 23 additions & 6 deletions pkgs/tools/security/pass/extensions/import.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
{ stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper }:
{ stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper, fetchpatch }:

let
pythonEnv = pythonPackages.python.withPackages (p: [ p.defusedxml ]);
pythonEnv = pythonPackages.python.withPackages (p: [
p.defusedxml
p.setuptools
p.pyaml
]);

in stdenv.mkDerivation rec {
pname = "pass-import";
version = "2.3";
version = "2.6";

src = fetchFromGitHub {
owner = "roddhjav";
repo = "pass-import";
rev = "v${version}";
sha256 = "1209aqkiqqbir5yzwk5jvyk8c1fyrsj9igr3n4banf347rlwmzfv";
sha256 = "1q8rln4djh2z8j2ycm654df5y6anm5iv2r19spgy07c3fnisxlac";
};

nativeBuildInputs = [ makeWrapper ];

buildInputs = [ pythonEnv ];

patchPhase = ''
patches = [
# https://github.com/roddhjav/pass-import/pull/91
(fetchpatch {
url = "https://github.com/roddhjav/pass-import/commit/6ccaf639e92df45bd400503757ae4aa2c5c030d7.patch";
sha256 = "0lw9vqvbqcy96s7v7nz0i1bdx93x7qr13azymqypcdhjwmq9i63h";
})
];

postPatch = ''
sed -i -e 's|$0|${pass}/bin/pass|' import.bash
'';

dontBuild = true;

installFlags = [ "PREFIX=$(out)" ];
installFlags = [
"PREFIX=$(out)"
"BASHCOMPDIR=$(out)/etc/bash_completion.d"
];

postFixup = ''
install -D pass_import.py $out/${pythonPackages.python.sitePackages}/pass_import.py
wrapProgram $out/lib/password-store/extensions/import.bash \
--prefix PATH : "${pythonEnv}/bin" \
--prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}" \
--run "export PREFIX"
'';