Merge pull request #212313 from figsoda/deb

cargo-deb: 1.30.0 -> 1.42.0
This commit is contained in:
figsoda 2023-01-23 18:34:13 -05:00 committed by GitHub
commit 287b071e9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 31 deletions

View file

@ -1,49 +1,41 @@
{ stdenv
, lib
, fetchFromGitHub
{ lib
, rustPlatform
, rust
, libiconv
, Security
, fetchFromGitHub
, makeWrapper
, dpkg
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deb";
version = "1.30.0";
version = "1.42.0";
src = fetchFromGitHub {
owner = "mmstick";
owner = "kornelski";
repo = pname;
rev = "v${version}";
sha256 = "sha256-rAmG6Aj0D9dHVueh1BN1Chhit+XFhqGib1WTvMDy0LI=";
hash = "sha256-5IWx9tScm64Rwi6RMsbXl1Eajtc/c5PWaZEDrgibTAY=";
};
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
cargoHash = "sha256-nwCfUxIrr4DxKqePu/vwxfLld08+GGXZwQWz6Gltmao=";
cargoSha256 = "sha256-MEpyEdjLWNZvqE7gJLvQ169tgmJRzec4vqQI9fF3xr8=";
nativeBuildInputs = [
makeWrapper
];
preCheck = ''
substituteInPlace tests/command.rs \
--replace 'target/debug' "target/${rust.toRustTarget stdenv.buildPlatform}/release"
# This is an FHS specific assert depending on glibc location
checkFlags = [
"--skip=dependencies::resolve_test"
];
# This is an FHS specific assert depending on glibc location
substituteInPlace src/dependencies.rs \
--replace 'assert!(deps.iter().any(|d| d.starts_with("libc")));' '// no libc assert here'
postInstall = ''
wrapProgram $out/bin/cargo-deb \
--prefix PATH : ${lib.makeBinPath [ dpkg ]}
'';
meta = with lib; {
description = "Generate Debian packages from information in Cargo.toml";
homepage = "https://github.com/mmstick/cargo-deb";
description = "A cargo subcommand that generates Debian packages from information in Cargo.toml";
homepage = "https://github.com/kornelski/cargo-deb";
license = licenses.mit;
# test failures:
# control::tests::generate_scripts_generates_maintainer_scripts_for_unit
# dh_installsystemd::tests::find_units_in_empty_dir_finds_nothing
# dh_lib::tests::apply_with_no_matching_files
# dh_lib::tests::debhelper_script_subst_with_generated_file_only
# dh_lib::tests::debhelper_script_subst_with_no_matching_files
# dh_lib::tests::pkgfile_finds_most_specific_match_without_pkg_file
# dh_lib::tests::pkgfile_finds_most_specific_match_without_unit_file
broken = (stdenv.isDarwin && stdenv.isx86_64);
maintainers = with maintainers; [ Br1ght0ne ];
};
}

View file

@ -15555,9 +15555,7 @@ with pkgs;
cargo-deadlinks = callPackage ../development/tools/rust/cargo-deadlinks {
inherit (darwin.apple_sdk.frameworks) Security;
};
cargo-deb = callPackage ../development/tools/rust/cargo-deb {
inherit (darwin.apple_sdk.frameworks) Security;
};
cargo-deb = callPackage ../development/tools/rust/cargo-deb { };
cargo-deps = callPackage ../development/tools/rust/cargo-deps { };
cargo-edit = callPackage ../development/tools/rust/cargo-edit {
inherit (darwin.apple_sdk.frameworks) Security;