about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-01-12 12:22:07 -0500
committerfigsoda <figsoda@pm.me>2023-01-12 12:22:59 -0500
commitb9259df616359f2badec2ab315c88989eacc0ac5 (patch)
tree0af969f159d08295a437897fa513ab542b091512 /pkgs
parenta113c6f06fa49e7a50c2477f13ed5167e11d28fc (diff)
rustPlatform.buildRustPackage: fix cross compiling auditable packages
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/rust/build-rust-package/default.nix3
-rw-r--r--pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix (renamed from pkgs/development/tools/rust/cargo-auditable/cargo-wrapper.nix)0
-rw-r--r--pkgs/development/compilers/rust/cargo-auditable.nix (renamed from pkgs/development/tools/rust/cargo-auditable/default.nix)0
-rw-r--r--pkgs/development/compilers/rust/default.nix2
-rw-r--r--pkgs/development/compilers/rust/make-rust-platform.nix9
-rw-r--r--pkgs/top-level/all-packages.nix4
6 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix
index a24425bf27aab..69ee4f56b98f7 100644
--- a/pkgs/build-support/rust/build-rust-package/default.nix
+++ b/pkgs/build-support/rust/build-rust-package/default.nix
@@ -10,6 +10,7 @@
 , cargoInstallHook
 , cargoNextestHook
 , cargoSetupHook
+, cargo
 , cargo-auditable
 , cargo-auditable-cargo-wrapper
 , rustc
@@ -120,7 +121,7 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
 
   nativeBuildInputs = nativeBuildInputs ++ lib.optionals auditable [
     (cargo-auditable-cargo-wrapper.override {
-      inherit cargo-auditable;
+      inherit cargo cargo-auditable;
     })
   ] ++ [
     cacert
diff --git a/pkgs/development/tools/rust/cargo-auditable/cargo-wrapper.nix b/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix
index 3afa59739a374..3afa59739a374 100644
--- a/pkgs/development/tools/rust/cargo-auditable/cargo-wrapper.nix
+++ b/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix
diff --git a/pkgs/development/tools/rust/cargo-auditable/default.nix b/pkgs/development/compilers/rust/cargo-auditable.nix
index 1c621276021aa..1c621276021aa 100644
--- a/pkgs/development/tools/rust/cargo-auditable/default.nix
+++ b/pkgs/development/compilers/rust/cargo-auditable.nix
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index 7a100f7ec9111..42ca74c7164d7 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -81,6 +81,8 @@ in
         rustPlatform = bootRustPlatform;
         inherit CoreFoundation Security;
       };
+      cargo-auditable = self.callPackage ./cargo-auditable.nix { };
+      cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { };
       clippy = self.callPackage ./clippy.nix { inherit Security; };
     });
   };
diff --git a/pkgs/development/compilers/rust/make-rust-platform.nix b/pkgs/development/compilers/rust/make-rust-platform.nix
index fcfd02dcf6cda..25a692565db37 100644
--- a/pkgs/development/compilers/rust/make-rust-platform.nix
+++ b/pkgs/development/compilers/rust/make-rust-platform.nix
@@ -1,6 +1,11 @@
 { buildPackages, callPackage, stdenv, runCommand }@prev:
 
-{ rustc, cargo, stdenv ? prev.stdenv, ... }:
+{ rustc
+, cargo
+, cargo-auditable ? null
+, stdenv ? prev.stdenv
+, ...
+}:
 
 rec {
   rust = {
@@ -14,7 +19,7 @@ rec {
 
   buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
     inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook
-      fetchCargoTarball importCargoLock rustc;
+      fetchCargoTarball importCargoLock rustc cargo cargo-auditable;
   };
 
   importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix { inherit cargo; };
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 133ff0345018c..ef7c41a72ae8a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15419,7 +15419,7 @@ with pkgs;
   rustPackages_1_66 = rust_1_66.packages.stable;
   rustPackages = rustPackages_1_66;
 
-  inherit (rustPackages) cargo clippy rustc rustPlatform;
+  inherit (rustPackages) cargo cargo-auditable cargo-auditable-cargo-wrapper clippy rustc rustPlatform;
 
   makeRustPlatform = callPackage ../development/compilers/rust/make-rust-platform.nix {};
 
@@ -15449,8 +15449,6 @@ with pkgs;
   cargo-audit = callPackage ../development/tools/rust/cargo-audit {
     inherit (darwin.apple_sdk.frameworks) Security;
   };
-  cargo-auditable = callPackage ../development/tools/rust/cargo-auditable { };
-  cargo-auditable-cargo-wrapper = callPackage ../development/tools/rust/cargo-auditable/cargo-wrapper.nix { };
   cargo-bisect-rustc = callPackage ../development/tools/rust/cargo-bisect-rustc {
     inherit (darwin.apple_sdk.frameworks) Security;
     openssl = openssl_1_1;