From 3309ff781b13cee8179a07ca7cd1b15123dc34ef Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 20 Jun 2023 11:47:21 -0400 Subject: [PATCH] cargo-duplicates: init at 0.5.1 https://github.com/Keruspe/cargo-duplicates --- .../tools/rust/cargo-duplicates/default.nix | 46 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/tools/rust/cargo-duplicates/default.nix diff --git a/pkgs/development/tools/rust/cargo-duplicates/default.nix b/pkgs/development/tools/rust/cargo-duplicates/default.nix new file mode 100644 index 000000000000..a3983162a93b --- /dev/null +++ b/pkgs/development/tools/rust/cargo-duplicates/default.nix @@ -0,0 +1,46 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, curl +, pkg-config +, libgit2 +, openssl +, zlib +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-duplicates"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "Keruspe"; + repo = "cargo-duplicates"; + rev = "v${version}"; + hash = "sha256-e0cegK4obUVIJyx5XKF+xicvkRvQwuObwB8tprrJnrw="; + }; + + cargoHash = "sha256-i1IyHCa/w4DOGlPWjDE4IbVm3s/40DIwjwUGIMTYH4Y="; + + nativeBuildInputs = [ + curl + pkg-config + ]; + + buildInputs = [ + curl + libgit2 + openssl + zlib + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + meta = with lib; { + description = "A cargo subcommand for displaying when different versions of a same dependency are pulled in"; + homepage = "https://github.com/Keruspe/cargo-duplicates"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6d9ad452583a..eee9472a02a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16522,6 +16522,7 @@ with pkgs; cargo-deb = callPackage ../development/tools/rust/cargo-deb { }; cargo-deps = callPackage ../development/tools/rust/cargo-deps { }; cargo-docset = callPackage ../development/tools/rust/cargo-docset { }; + cargo-duplicates = callPackage ../development/tools/rust/cargo-duplicates { }; cargo-edit = callPackage ../development/tools/rust/cargo-edit { inherit (darwin.apple_sdk.frameworks) Security; };