depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-local-registry/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

55 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, curl
, pkg-config
, libgit2
, openssl
, zlib
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-local-registry";
version = "0.2.5";
src = fetchFromGitHub {
owner = "dhovart";
repo = "cargo-local-registry";
rev = version;
hash = "sha256-3xp0LLk3MpL54PMGLHTAKcsM6fwMxB8LOdN0Xcap/xA=";
};
cargoHash = "sha256-HknfcJfOQ40ecpKM8GGbquRxLQTEGyRFkwXhsjrl8FA=";
nativeBuildInputs = [
curl
pkg-config
];
buildInputs = [
curl
libgit2
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 ];
};
}