depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-deb/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

41 lines
933 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, dpkg
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deb";
version = "1.42.1";
src = fetchFromGitHub {
owner = "kornelski";
repo = pname;
rev = "v${version}";
hash = "sha256-8o3WQ/kaYhp1gjHLQeDU9JITv9crxAVCP8UReIVd4Fc=";
};
cargoHash = "sha256-EbcH2aBs9haXKBdEWJRPqJ1PSLj3pHdHJi38LH08uTk=";
nativeBuildInputs = [
makeWrapper
];
# This is an FHS specific assert depending on glibc location
checkFlags = [
"--skip=dependencies::resolve_test"
];
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";
homepage = "https://github.com/kornelski/cargo-deb";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne ];
};
}