diff --git a/pkgs/development/tools/rust/cargo-guppy/default.nix b/pkgs/development/tools/rust/cargo-guppy/default.nix new file mode 100644 index 000000000000..62e7b970b516 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-guppy/default.nix @@ -0,0 +1,38 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, openssl +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-guppy"; + version = "unstable-2022-10-29"; + + src = fetchFromGitHub { + owner = "guppy-rs"; + repo = "guppy"; + rev = "448d830de4867c32eaa57911a392e47c81d1a0e0"; + sha256 = "sha256-Ce6WO01gN8Ip5smAyGNEg87vyFXFDIq6ilHTbEStm/c="; + }; + + cargoSha256 = "sha256-DR/k6g2uWCOhM20qROybsH4gTvH+Kd+jaDHGZ4loK7g="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + cargoBuildFlags = [ "-p" "cargo-guppy" ]; + cargoTestFlags = [ "-p" "cargo-guppy" ]; + + meta = with lib; { + description = "A command-line frontend for guppy"; + homepage = "https://github.com/guppy-rs/guppy/tree/main/cargo-guppy"; + license = with licenses; [ mit /* or */ asl20 ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef335956c6ec..4373a673fb07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14936,6 +14936,7 @@ with pkgs; }; cargo-kcov = callPackage ../development/tools/rust/cargo-kcov { }; cargo-graph = callPackage ../development/tools/rust/cargo-graph { }; + cargo-guppy = callPackage ../development/tools/rust/cargo-guppy { }; cargo-hack = callPackage ../development/tools/rust/cargo-hack { }; cargo-license = callPackage ../development/tools/rust/cargo-license { }; cargo-llvm-lines = callPackage ../development/tools/rust/cargo-llvm-lines { };