about summary refs log tree commit diff
path: root/pkgs/development/tools/rust/cargo-deb/default.nix
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-01-23 15:52:07 -0500
committerfigsoda <figsoda@pm.me>2023-01-23 16:26:12 -0500
commit7f114ba908070240bafea60830222dfa29bc3af4 (patch)
treebcd2db8b3f4c20428a7ff7fd0ee1e10ea76344a3 /pkgs/development/tools/rust/cargo-deb/default.nix
parentf8f3a81a6d12f6f93c6671e986111acae0e2ea75 (diff)
cargo-deb: 1.30.0 -> 1.42.0
Diff: https://github.com/kornelski/cargo-deb/compare/v1.30.0...v1.42.0
Diffstat (limited to 'pkgs/development/tools/rust/cargo-deb/default.nix')
-rw-r--r--pkgs/development/tools/rust/cargo-deb/default.nix48
1 files changed, 20 insertions, 28 deletions
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 ];
   };
 }