2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, rustPlatform
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, dpkg
|
2020-06-18 07:06:33 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-deb";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.42.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-02-02 18:25:31 +00:00
|
|
|
owner = "kornelski";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
2021-03-09 03:18:52 +00:00
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-8o3WQ/kaYhp1gjHLQeDU9JITv9crxAVCP8UReIVd4Fc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
cargoHash = "sha256-EbcH2aBs9haXKBdEWJRPqJ1PSLj3pHdHJi38LH08uTk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
# This is an FHS specific assert depending on glibc location
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=dependencies::resolve_test"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/cargo-deb \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ dpkg ]}
|
2020-06-18 07:06:33 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
description = "A cargo subcommand that generates Debian packages from information in Cargo.toml";
|
|
|
|
homepage = "https://github.com/kornelski/cargo-deb";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|