depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-dist/default.nix

51 lines
1,008 B
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, bzip2
, xz
, zstd
, stdenv
, rustup
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-dist";
version = "0.0.7";
src = fetchFromGitHub {
owner = "axodotdev";
repo = "cargo-dist";
rev = "v${version}";
hash = "sha256-uXC+iaOcEIyGMVNtAduhT68GuE29aL/3S6uEMllAWNA=";
};
cargoHash = "sha256-/TLi+ESOZhJ4Xg3hdUEWhM0K4asI9+L1M1+hWuDOj9Q=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
bzip2
xz
zstd
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
nativeCheckInputs = lib.optionals stdenv.isDarwin [
rustup
];
meta = with lib; {
description = "A tool for building final distributable artifacts and uploading them to an archive";
homepage = "https://github.com/axodotdev/cargo-dist";
changelog = "https://github.com/axodotdev/cargo-dist/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ figsoda ];
};
}