diff --git a/pkgs/tools/security/rbw/bump-security-framework-crate.patch b/pkgs/tools/security/rbw/bump-security-framework-crate.patch deleted file mode 100644 index 9074dd925b82..000000000000 --- a/pkgs/tools/security/rbw/bump-security-framework-crate.patch +++ /dev/null @@ -1,19 +0,0 @@ -Bump security-framework from 2.1.1 to 2.1.2 - -security-framework=2.1.1 doesn't build on Darwin 10.12. -https://github.com/kornelski/rust-security-framework/issues/124 - ---- i/Cargo.lock -+++ w/Cargo.lock -@@ -1361,9 +1361,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - - [[package]] - name = "security-framework" --version = "2.1.1" -+version = "2.1.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2dfd318104249865096c8da1dfabf09ddbb6d0330ea176812a62ec75e40c4166" -+checksum = "d493c5f39e02dfb062cd8f33301f90f9b13b650e8c1b1d0fd75c19dd64bff69d" - dependencies = [ - "bitflags", - "core-foundation", diff --git a/pkgs/tools/security/rbw/default.nix b/pkgs/tools/security/rbw/default.nix index c1f99719d76c..96616987510d 100644 --- a/pkgs/tools/security/rbw/default.nix +++ b/pkgs/tools/security/rbw/default.nix @@ -5,6 +5,7 @@ , openssl , pkg-config , makeWrapper +, installShellFiles , Security , libiconv @@ -20,21 +21,20 @@ rustPlatform.buildRustPackage rec { pname = "rbw"; - version = "1.1.2"; + version = "1.2.0"; src = fetchCrate { inherit version; crateName = pname; - sha256 = "1xihjx4f8kgyablxsy8vgn4w6i92p2xm5ncacdk39npa5g8wadlx"; + sha256 = "14cnqc5cf6qm2g9ypv2pbqbvymawyrqn3fc778labgqg24khqcyq"; }; - cargoSha256 = "0fvs06wd05a90dggi7n46d5gl9flnciqzg9j3ijmz3z5bb6aky1b"; - - cargoPatches = [ ./bump-security-framework-crate.patch ]; + cargoSha256 = "0izn5bcvk1rx69sjwyfc49nmvw7k0jysqb0bpdpwdliaa06ggl86"; nativeBuildInputs = [ pkg-config makeWrapper + installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ]; @@ -60,7 +60,12 @@ rustPlatform.buildRustPackage rec { export OPENSSL_LIB_DIR="${openssl.out}/lib" ''; - postInstall = lib.optionalString withFzf '' + postInstall = '' + for shell in bash zsh fish; do + $out/bin/rbw gen-completions $shell > rbw.$shell + installShellCompletion rbw.$shell + done + '' + lib.optionalString withFzf '' cp bin/rbw-fzf $out/bin '' + lib.optionalString withRofi '' cp bin/rbw-rofi $out/bin