depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-deb/default.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

43 lines
1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, dpkg
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deb";
version = "2.7.0";
src = fetchFromGitHub {
owner = "kornelski";
repo = pname;
rev = "v${version}";
hash = "sha256-ReXDrbFY2qY/0TUYD+EiP9Qa9KwMGb9iLL+tdfDLSpc=";
};
cargoHash = "sha256-yBMeiYWsb+D8WzWRDDi9JFZTFvQAQ7QUeGDb6yFelD8=";
nativeBuildInputs = [
makeWrapper
];
# This is an FHS specific assert depending on glibc location
checkFlags = [
"--skip=dependencies::resolve_test"
"--skip=run_cargo_deb_command_on_example_dir_with_separate_debug_symbols"
];
postInstall = ''
wrapProgram $out/bin/cargo-deb \
--prefix PATH : ${lib.makeBinPath [ dpkg ]}
'';
meta = with lib; {
description = "Cargo subcommand that generates Debian packages from information in Cargo.toml";
mainProgram = "cargo-deb";
homepage = "https://github.com/kornelski/cargo-deb";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne matthiasbeyer ];
};
}