nixpkgs/pkgs/by-name/ca/cargo-binstall/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.5 KiB
Nix
Raw Normal View History

2023-02-09 21:55:25 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, bzip2
, xz
, zstd
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-binstall";
2024-11-20 02:14:13 +00:00
version = "1.10.13";
2023-02-09 21:55:25 +00:00
src = fetchFromGitHub {
owner = "cargo-bins";
repo = "cargo-binstall";
rev = "v${version}";
2024-11-20 02:14:13 +00:00
hash = "sha256-z18p25myXINtQpuNw+tHiyj1J1oDEmkQ+v4dj4GKYtg=";
2023-02-09 21:55:25 +00:00
};
2024-11-20 02:14:13 +00:00
cargoHash = "sha256-cRTaGqArCbmlu6xthBMijtyyL7s+4mvxl1Yeuw5VS9A=";
2023-02-09 21:55:25 +00:00
nativeBuildInputs = [
pkg-config
];
buildInputs = [
bzip2
xz
zstd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
2023-10-08 19:10:23 +00:00
darwin.apple_sdk.frameworks.SystemConfiguration
2023-02-09 21:55:25 +00:00
];
buildNoDefaultFeatures = true;
buildFeatures = [
"fancy-no-backtrace"
"git"
2023-02-09 21:55:25 +00:00
"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"
];
2023-02-09 21:55:25 +00:00
meta = with lib; {
description = "Tool for installing rust binaries as an alternative to building from source";
mainProgram = "cargo-binstall";
2023-02-09 21:55:25 +00:00
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 ];
};
}