From 16f68c3db5e4e975953053f4c9fc70d80269c25c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 18 Feb 2023 04:20:00 +0000 Subject: [PATCH] rbw: 1.4.3 -> 1.5.0 --- pkgs/tools/security/rbw/default.nix | 58 +++++++++++------------------ 1 file changed, 22 insertions(+), 36 deletions(-) diff --git a/pkgs/tools/security/rbw/default.nix b/pkgs/tools/security/rbw/default.nix index a5eb83f1e0b5..04b3f1aecbd0 100644 --- a/pkgs/tools/security/rbw/default.nix +++ b/pkgs/tools/security/rbw/default.nix @@ -26,61 +26,47 @@ rustPlatform.buildRustPackage rec { pname = "rbw"; - version = "1.4.3"; + version = "1.5.0"; src = fetchCrate { inherit version; crateName = pname; - sha256 = "sha256-teeGKQNf+nuUcF9BcdiTV/ycENTbcGvPZZ34FdOO31k="; + sha256 = "sha256-3kSBE2D+kC9CTbWlCKPro9fLu2tnd6LFTV4EshHMm3Y="; }; - cargoSha256 = "sha256-Soquc3OuGlDsGSwNCvYOWQeraYpkzX1oJwmM03Rc3Jg="; + cargoSha256 = "sha256-DL3qaUZxWnzsJOxi8+GtXBbZC7vfsridJWqhOTdcsgM="; nativeBuildInputs = [ - pkg-config - makeWrapper installShellFiles - ]; + ] ++ lib.optionals stdenv.isLinux [ pkg-config ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ]; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; - 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 \ - --replace perl ${perl}/bin/perl - '' + lib.optionalString withRofi '' - patchShebangs bin/rbw-rofi - substituteInPlace bin/rbw-rofi \ - --replace rofi ${rofi}/bin/rofi \ - --replace xclip ${xclip}/bin/xclip - '' + lib.optionalString withRofi '' - patchShebangs bin/pass-import - substituteInPlace bin/pass-import \ - --replace pass ${pass}/bin/pass - ''; - - preConfigure = '' + preConfigure = lib.optionalString stdenv.isLinux '' export OPENSSL_INCLUDE_DIR="${openssl.dev}/include" export OPENSSL_LIB_DIR="${lib.getLib openssl}/lib" ''; postInstall = '' - for shell in bash zsh fish; do - $out/bin/rbw gen-completions $shell > rbw.$shell - installShellCompletion rbw.$shell - done - cp bin/git-credential-rbw $out/bin + install -Dm755 -t $out/bin bin/git-credential-rbw + installShellCompletion --cmd rbw \ + --bash <($out/bin/rbw gen-completions bash) \ + --fish <($out/bin/rbw gen-completions fish) \ + --zsh <($out/bin/rbw gen-completions zsh) '' + lib.optionalString withFzf '' - cp bin/rbw-fzf $out/bin + install -Dm755 -t $out/bin bin/rbw-fzf + substituteInPlace $out/bin/rbw-fzf \ + --replace fzf ${fzf}/bin/fzf \ + --replace perl ${perl}/bin/perl '' + lib.optionalString withRofi '' - cp bin/rbw-rofi $out/bin + install -Dm755 -t $out/bin bin/rbw-rofi + substituteInPlace $out/bin/rbw-rofi \ + --replace rofi ${rofi}/bin/rofi \ + --replace xclip ${xclip}/bin/xclip '' + lib.optionalString withPass '' - cp bin/pass-import $out/bin + install -Dm755 -t $out/bin bin/pass-import + substituteInPlace $out/bin/pass-import \ + --replace pass ${pass}/bin/pass ''; meta = with lib; {