about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix b/nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix
index c6e8b4803ccf..96ef0eef8c5a 100644
--- a/nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix
+++ b/nixpkgs/pkgs/tools/package-management/cargo-deb/default.nix
@@ -2,7 +2,9 @@
 , lib
 , fetchFromGitHub
 , rustPlatform
-, Security }:
+, rust
+, Security
+}:
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-deb";
@@ -19,6 +21,13 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "1vqnnqn6rzkdi239bh3lk7gaxr7w6v3c4ws4ya1ah04g6v9hkzlw";
 
+  checkType = "debug";
+
+  preCheck = ''
+    substituteInPlace tests/command.rs \
+      --replace 'target/debug' "target/${rust.toRustTarget stdenv.buildPlatform}/debug"
+  '';
+
   meta = with lib; {
     description = "Generate Debian packages from information in Cargo.toml";
     homepage = "https://github.com/mmstick/cargo-deb";