9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
55 lines
1.1 KiB
Nix
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 ];
|
|
};
|
|
}
|