From 7b9fa5f6c36e91b3ea6b2e97c647a062af951c46 Mon Sep 17 00:00:00 2001 From: Peter Kolloch Date: Sun, 22 Oct 2023 18:57:07 +0200 Subject: [PATCH] crate2nix: 0.10.0 -> 0.11.0 ...and add shell completions for bash/zsh --- .../tools/rust/crate2nix/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/rust/crate2nix/default.nix b/pkgs/development/tools/rust/crate2nix/default.nix index cba3b4b3dd7d..5f8b3d2cdc6e 100644 --- a/pkgs/development/tools/rust/crate2nix/default.nix +++ b/pkgs/development/tools/rust/crate2nix/default.nix @@ -10,18 +10,18 @@ rustPlatform.buildRustPackage rec { pname = "crate2nix"; - version = "0.10.0"; + version = "0.11.0"; src = fetchFromGitHub { - owner = "kolloch"; + owner = "nix-community"; repo = pname; rev = version; - sha256 = "sha256-JaF9/H3m4Wrc5MtXcONkOAgKVkswLVw0yZe0dBr2e4Y="; + sha256 = "sha256-nyX1lfaA0eBSB/BaxPzCsyD8p/hxCwNIvr4Ru3i/YX0="; }; sourceRoot = "${src.name}/crate2nix"; - cargoSha256 = "sha256-PD7R1vcb3FKd4hfpViKyvfCExJ5H1Xo2HPYden5zpxQ="; + cargoSha256 = "sha256-3+emOr3hh+DDkboJbYyJFZgkzmcdA9jdronz7wM4x28="; nativeBuildInputs = [ makeWrapper ]; @@ -32,6 +32,13 @@ rustPlatform.buildRustPackage rec { postFixup = '' wrapProgram $out/bin/crate2nix \ --suffix PATH ":" ${lib.makeBinPath [ cargo nix nix-prefetch-git ]} + + rm -rf $out/lib $out/bin/crate2nix.d + mkdir -p \ + $out/share/bash-completion/completions \ + $out/share/zsh/vendor-completions + $out/bin/crate2nix completions -s 'bash' -o $out/share/bash-completion/completions + $out/bin/crate2nix completions -s 'zsh' -o $out/share/zsh/vendor-completions ''; meta = with lib; { @@ -40,9 +47,10 @@ rustPlatform.buildRustPackage rec { Crate2nix generates Nix files from Cargo.toml/lock files so that you can build every crate individually in a Nix sandbox. ''; - homepage = "https://github.com/kolloch/crate2nix"; + homepage = "https://github.com/nix-community/crate2nix"; license = licenses.asl20; maintainers = with maintainers; [ kolloch cole-h ]; platforms = platforms.all; }; } +