depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-deb/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

43 lines
1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, dpkg
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deb";
version = "2.5.1";
src = fetchFromGitHub {
owner = "kornelski";
repo = pname;
rev = "v${version}";
hash = "sha256-COXYXx7C+IDJiw/y+GLY0oJYxtUjnGsikeWUk3z5B48=";
};
cargoHash = "sha256-5iU6jk8yZLVUjksB4g39zBtfm6LTeBgXOLsw/M5CZZc=";
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 ];
};
}