depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-binstall/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

64 lines
1.4 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, bzip2
, xz
, zstd
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-binstall";
version = "1.1.2";
src = fetchFromGitHub {
owner = "cargo-bins";
repo = "cargo-binstall";
rev = "v${version}";
hash = "sha256-TAHM+R66S8I0QmCI5RHb0mJUf5Ffq6CKH28rxlFoE/I=";
};
cargoHash = "sha256-ef7Q+qQRadNseQwoVvAHWADSE7IgrgKppMmMUL2JB10=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
bzip2
xz
zstd
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
buildNoDefaultFeatures = true;
buildFeatures = [
"fancy-no-backtrace"
"git"
"pkg-config"
"rustls"
"trust-dns"
"zstd-thin"
];
cargoBuildFlags = [ "-p" "cargo-binstall" ];
cargoTestFlags = [ "-p" "cargo-binstall" ];
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"
];
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 ];
};
}