depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-deb/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

43 lines
1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, dpkg
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deb";
version = "2.1.0";
src = fetchFromGitHub {
owner = "kornelski";
repo = pname;
rev = "v${version}";
hash = "sha256-LCyTbOSSz3O53hZmOPcK+tB5LNZLE4uwfOZrwJZuebc=";
};
cargoHash = "sha256-apT60W4lUCMsRvuzGkY8AkA8m8e7ESGGnmOpyv5Ca1I=";
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 = "A 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 ];
};
}