nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix

36 lines
873 B
Nix
Raw Normal View History

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