diff options
author | Ivan Kovnatsky <75213+ivankovnatsky@users.noreply.github.com> | 2021-11-03 12:17:49 +0200 |
---|---|---|
committer | Ivan Kovnatsky <75213+ivankovnatsky@users.noreply.github.com> | 2021-11-03 14:51:42 +0200 |
commit | 4d6c9e246c5092cfe7bddf6525e89aa03ecd505d (patch) | |
tree | 70b4def0395d6a0ee8d6d5511667e847b3a99834 /pkgs/tools/security/rbw | |
parent | 19781e666325b6803c559ba18d4d4008705c369d (diff) |
rbw: Install git credential helper without an option
Diffstat (limited to 'pkgs/tools/security/rbw')
-rw-r--r-- | pkgs/tools/security/rbw/default.nix | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pkgs/tools/security/rbw/default.nix b/pkgs/tools/security/rbw/default.nix index 3a8af973cf7ad..278e009039297 100644 --- a/pkgs/tools/security/rbw/default.nix +++ b/pkgs/tools/security/rbw/default.nix @@ -22,9 +22,6 @@ # pass-import , withPass ? false , pass - - # git-credential-helper -, withGitCredential ? false }: rustPlatform.buildRustPackage rec { @@ -47,7 +44,11 @@ rustPlatform.buildRustPackage rec { buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ]; - postPatch = lib.optionalString withFzf '' + postPatch = '' + patchShebangs bin/git-credential-rbw + substituteInPlace bin/git-credential-rbw \ + --replace rbw $out/bin/rbw + '' + lib.optionalString withFzf '' patchShebangs bin/rbw-fzf substituteInPlace bin/rbw-fzf \ --replace fzf ${fzf}/bin/fzf \ @@ -61,10 +62,6 @@ rustPlatform.buildRustPackage rec { patchShebangs bin/pass-import substituteInPlace bin/pass-import \ --replace pass ${pass}/bin/pass - '' + lib.optionalString withGitCredential '' - patchShebangs bin/git-credential-rbw - substituteInPlace bin/git-credential-rbw \ - --replace rbw $out/bin/rbw ''; preConfigure = '' @@ -77,14 +74,14 @@ rustPlatform.buildRustPackage rec { $out/bin/rbw gen-completions $shell > rbw.$shell installShellCompletion rbw.$shell done + '' + '' + cp bin/git-credential-rbw $out/bin '' + lib.optionalString withFzf '' cp bin/rbw-fzf $out/bin '' + lib.optionalString withRofi '' cp bin/rbw-rofi $out/bin '' + lib.optionalString withPass '' cp bin/pass-import $out/bin - '' + lib.optionalString withGitCredential '' - cp bin/git-credential-rbw $out/bin ''; meta = with lib; { |