diff options
author | figsoda <figsoda@pm.me> | 2023-06-21 17:04:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 17:04:43 -0400 |
commit | c09bf88297b6fc7b7b902fcf06e194756221579c (patch) | |
tree | 9781fa9b16ca128584e2aa1ff2f1f99e04cd2f63 /pkgs/development | |
parent | 07e2abd7e5faddde32860b7f7c0ce69f57dda81c (diff) | |
parent | 651cd4e4c7a689ed3a8d848305177fd1faeef54f (diff) |
Merge pull request #238677 from figsoda/local-registry
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/rust/cargo-local-registry/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/tools/rust/cargo-local-registry/default.nix b/pkgs/development/tools/rust/cargo-local-registry/default.nix new file mode 100644 index 0000000000000..d4e35f2bb9768 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-local-registry/default.nix @@ -0,0 +1,53 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, curl +, openssl +, zlib +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-local-registry"; + version = "0.2.3"; + + src = fetchFromGitHub { + owner = "dhovart"; + repo = "cargo-local-registry"; + rev = version; + hash = "sha256-nxLqWtZl3ZF/iodYsQCYQ/prjp80QMzJLLp31q7d2vs="; + }; + + cargoHash = "sha256-k94jzMdZDWpxSHVEZh1Qsv8OuUKuqU2YNBN1Mqj8HJA="; + + nativeBuildInputs = [ + curl + pkg-config + ]; + + buildInputs = [ + curl + openssl + zlib + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + # tests require internet access + doCheck = false; + + # Cargo.lock is outdated + preConfigure = '' + cargo metadata --offline + ''; + + meta = with lib; { + description = "A cargo subcommand to manage local registries"; + homepage = "https://github.com/dhovart/cargo-local-registry"; + changelog = "https://github.com/dhovart/cargo-local-registry/releases/tag/${src.rev}"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ figsoda ]; + }; +} |