2020-01-09 05:30:54 -08:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2020-05-12 16:38:15 -07:00
|
|
|
, rust
|
|
|
|
, Security
|
|
|
|
}:
|
2019-11-11 07:50:48 -08:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-deb";
|
2021-02-24 19:41:24 -08:00
|
|
|
version = "1.29.1";
|
2019-11-11 07:50:48 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mmstick";
|
2020-01-09 05:30:54 -08:00
|
|
|
repo = pname;
|
2021-02-24 19:41:24 -08:00
|
|
|
rev = "86d02f9cacaf4a4f9b576e2dbd9dad65baa61a0d";
|
|
|
|
sha256 = "sha256-oWivGy2azF9zpeZ0UAi7Bxm4iXFWAjcBG0pN7qtkSU8=";
|
2019-11-11 07:50:48 -08:00
|
|
|
};
|
|
|
|
|
2020-01-09 05:30:54 -08:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2019-11-11 07:50:48 -08:00
|
|
|
|
2021-02-24 19:41:24 -08:00
|
|
|
cargoSha256 = "sha256-HgGl1JWNkPEBODzWa6mfXuAtF8jOgT0Obx4mX9nOLkk=";
|
2019-11-11 07:50:48 -08:00
|
|
|
|
2020-05-12 16:38:15 -07:00
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace tests/command.rs \
|
2021-02-24 19:37:19 -08:00
|
|
|
--replace 'target/debug' "target/${rust.toRustTarget stdenv.buildPlatform}/release"
|
2020-05-12 16:38:15 -07:00
|
|
|
'';
|
|
|
|
|
2020-01-09 05:30:54 -08:00
|
|
|
meta = with lib; {
|
2019-11-11 07:50:48 -08:00
|
|
|
description = "Generate Debian packages from information in Cargo.toml";
|
|
|
|
homepage = "https://github.com/mmstick/cargo-deb";
|
|
|
|
license = licenses.mit;
|
2020-11-17 03:02:06 -08:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2019-11-11 07:50:48 -08:00
|
|
|
};
|
|
|
|
}
|