2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
2023-05-24 13:37:59 +00:00
|
|
|
, xz
|
|
|
|
, zstd
|
2023-03-04 12:14:45 +00:00
|
|
|
, stdenv
|
2023-08-22 20:05:09 +00:00
|
|
|
, darwin
|
|
|
|
, git
|
2023-03-04 12:14:45 +00:00
|
|
|
, rustup
|
2023-02-16 17:41:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-dist";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.3.1";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "axodotdev";
|
|
|
|
repo = "cargo-dist";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-h3ga4H9gIS3H6krPqXyYHMIhlxFQPbEfZV8cpQWWhpw=";
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoHash = "sha256-RP4/bcKA+5tjBFkR6DGNUPLpi/1fZAsRZeLMRSg1aes=";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
2023-05-24 13:37:59 +00:00
|
|
|
xz
|
|
|
|
zstd
|
2023-08-22 20:05:09 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
git
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
rustup
|
2023-02-16 17:41:37 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
env = {
|
|
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# remove tests that require internet access
|
|
|
|
postPatch = ''
|
|
|
|
rm cargo-dist/tests/integration-tests.rs
|
|
|
|
'';
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool for building final distributable artifacts and uploading them to an archive";
|
|
|
|
homepage = "https://github.com/axodotdev/cargo-dist";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/axodotdev/cargo-dist/blob/${src.rev}/CHANGELOG.md";
|
2023-02-16 17:41:37 +00:00
|
|
|
license = with licenses; [ asl20 mit ];
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer ];
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
}
|