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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.5.0";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "axodotdev";
|
|
|
|
repo = "cargo-dist";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Km/vaEOna+RvckNawIQTSp+FW49P5jx9euKeMaLuOsw=";
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-ccVflBHwEAuG0Y9Mmit1X6FLsM4bbt8Kd7fB6zBwKMc=";
|
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 [
|
2023-11-16 04:20:00 +00:00
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
git
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|