2023-06-20 02:38:27 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, curl
|
2023-07-14 15:14:02 +00:00
|
|
|
, pkg-config
|
|
|
|
, libgit2
|
2023-06-20 02:38:27 +00:00
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-local-registry";
|
2023-07-17 13:33:35 +00:00
|
|
|
version = "0.2.6";
|
2023-06-20 02:38:27 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dhovart";
|
|
|
|
repo = "cargo-local-registry";
|
|
|
|
rev = version;
|
2023-07-17 13:33:35 +00:00
|
|
|
hash = "sha256-2tSO82XRCUekEBrd9wDzxeg2r2C+F9wgz3ffYFG7+q8=";
|
2023-06-20 02:38:27 +00:00
|
|
|
};
|
|
|
|
|
2023-07-17 13:33:35 +00:00
|
|
|
cargoHash = "sha256-vxdQLfr4G73MpPrrcbcQRZGbTHJztUP3FwShj6zFhEY=";
|
2023-06-20 02:38:27 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
curl
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
2023-07-14 15:14:02 +00:00
|
|
|
libgit2
|
2023-06-20 02:38:27 +00:00
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
2023-07-23 19:59:03 +00:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
2023-06-20 02:38:27 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|