depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-binstall/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

64 lines
1.5 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, bzip2
, xz
, zstd
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-binstall";
version = "1.4.3";
src = fetchFromGitHub {
owner = "cargo-bins";
repo = "cargo-binstall";
rev = "v${version}";
hash = "sha256-z69uGnXyzV4spa3pNMwZrqOX1i0RYCgo8dwfZ86MBlA=";
};
cargoHash = "sha256-/eXdbHDVzM4hHRfP/gw+IXZVDuZcergGyotnvQEKEiw=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
bzip2
xz
zstd
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
];
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 ];
};
}