From 7f114ba908070240bafea60830222dfa29bc3af4 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 23 Jan 2023 15:52:07 -0500 Subject: cargo-deb: 1.30.0 -> 1.42.0 Diff: https://github.com/kornelski/cargo-deb/compare/v1.30.0...v1.42.0 --- pkgs/development/tools/rust/cargo-deb/default.nix | 48 ++++++++++------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'pkgs/development/tools/rust/cargo-deb/default.nix') diff --git a/pkgs/development/tools/rust/cargo-deb/default.nix b/pkgs/development/tools/rust/cargo-deb/default.nix index 2eb2ddd2d9843..0472dd8dfa691 100644 --- a/pkgs/development/tools/rust/cargo-deb/default.nix +++ b/pkgs/development/tools/rust/cargo-deb/default.nix @@ -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 ]; }; } -- cgit 1.4.1