2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2024-01-25 14:12:00 +00:00
|
|
|
, nix-update-script
|
2023-02-16 17:41:37 +00:00
|
|
|
, 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-25 14:12:00 +00:00
|
|
|
version = "0.8.0";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "axodotdev";
|
|
|
|
repo = "cargo-dist";
|
|
|
|
rev = "v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-AyxC1YS1VvCBIS6lKDtT2zX3bhorF4G+qg+brm4tJm8=";
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
cargoHash = "sha256-kStLY/Hjj0DeisjXzw2BbmJalNljUP0ogBEXcoDX3FE=";
|
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;
|
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# remove tests that require internet access and a git repo
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
rm cargo-dist/tests/integration-tests.rs
|
2024-01-25 14:12:00 +00:00
|
|
|
rm cargo-dist/tests/cli-tests.rs
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
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 ];
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer mistydemeo ];
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
}
|