2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
|
|
|
, xz
|
|
|
|
, zstd
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-binstall";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.5.0";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cargo-bins";
|
|
|
|
repo = "cargo-binstall";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-QPUZnqELncUCfm995NN0hYDGFZcKrYXskZIaN2ZRtzk=";
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
cargoHash = "sha256-85r0jDBuvfrJq776MSbQT6w60/xWQkC9zLmZwjdanCk=";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
|
|
|
xz
|
|
|
|
zstd
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-10-09 19:29:22 +00:00
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
2023-02-16 17:41:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildNoDefaultFeatures = true;
|
|
|
|
buildFeatures = [
|
|
|
|
"fancy-no-backtrace"
|
2023-07-15 17:15:38 +00:00
|
|
|
"git"
|
2023-02-16 17:41:37 +00:00
|
|
|
"pkg-config"
|
|
|
|
"rustls"
|
|
|
|
"trust-dns"
|
|
|
|
"zstd-thin"
|
|
|
|
];
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoBuildFlags = [ "-p" "cargo-binstall" ];
|
|
|
|
cargoTestFlags = [ "-p" "cargo-binstall" ];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
checkFlags = [
|
|
|
|
# requires internet access
|
|
|
|
"--skip=download::test::test_and_extract"
|
|
|
|
"--skip=gh_api_client::test::test_gh_api_client_cargo_binstall_no_such_release"
|
|
|
|
"--skip=gh_api_client::test::test_gh_api_client_cargo_binstall_v0_20_1"
|
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool for installing rust binaries as an alternative to building from source";
|
|
|
|
homepage = "https://github.com/cargo-bins/cargo-binstall";
|
|
|
|
changelog = "https://github.com/cargo-bins/cargo-binstall/releases/tag/v${version}";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|