rbw: Install git credential helper without an option
This commit is contained in:
parent
19781e6663
commit
4d6c9e246c
1 changed files with 7 additions and 10 deletions
|
@ -22,9 +22,6 @@
|
||||||
# pass-import
|
# pass-import
|
||||||
, withPass ? false
|
, withPass ? false
|
||||||
, pass
|
, pass
|
||||||
|
|
||||||
# git-credential-helper
|
|
||||||
, withGitCredential ? false
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -47,7 +44,11 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
|
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
|
patchShebangs bin/rbw-fzf
|
||||||
substituteInPlace bin/rbw-fzf \
|
substituteInPlace bin/rbw-fzf \
|
||||||
--replace fzf ${fzf}/bin/fzf \
|
--replace fzf ${fzf}/bin/fzf \
|
||||||
|
@ -61,10 +62,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
patchShebangs bin/pass-import
|
patchShebangs bin/pass-import
|
||||||
substituteInPlace bin/pass-import \
|
substituteInPlace bin/pass-import \
|
||||||
--replace pass ${pass}/bin/pass
|
--replace pass ${pass}/bin/pass
|
||||||
'' + lib.optionalString withGitCredential ''
|
|
||||||
patchShebangs bin/git-credential-rbw
|
|
||||||
substituteInPlace bin/git-credential-rbw \
|
|
||||||
--replace rbw $out/bin/rbw
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -77,14 +74,14 @@ rustPlatform.buildRustPackage rec {
|
||||||
$out/bin/rbw gen-completions $shell > rbw.$shell
|
$out/bin/rbw gen-completions $shell > rbw.$shell
|
||||||
installShellCompletion rbw.$shell
|
installShellCompletion rbw.$shell
|
||||||
done
|
done
|
||||||
|
'' + ''
|
||||||
|
cp bin/git-credential-rbw $out/bin
|
||||||
'' + lib.optionalString withFzf ''
|
'' + lib.optionalString withFzf ''
|
||||||
cp bin/rbw-fzf $out/bin
|
cp bin/rbw-fzf $out/bin
|
||||||
'' + lib.optionalString withRofi ''
|
'' + lib.optionalString withRofi ''
|
||||||
cp bin/rbw-rofi $out/bin
|
cp bin/rbw-rofi $out/bin
|
||||||
'' + lib.optionalString withPass ''
|
'' + lib.optionalString withPass ''
|
||||||
cp bin/pass-import $out/bin
|
cp bin/pass-import $out/bin
|
||||||
'' + lib.optionalString withGitCredential ''
|
|
||||||
cp bin/git-credential-rbw $out/bin
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue