Merge pull request #210394 from figsoda/cross

[next] rustPlatform.buildRustPackage: fix cross compiling auditable packages
This commit is contained in:
figsoda 2023-01-12 16:55:56 -05:00 committed by GitHub
commit 0defa75371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 6 deletions

View File

@ -10,6 +10,7 @@
, cargoInstallHook , cargoInstallHook
, cargoNextestHook , cargoNextestHook
, cargoSetupHook , cargoSetupHook
, cargo
, cargo-auditable , cargo-auditable
, cargo-auditable-cargo-wrapper , cargo-auditable-cargo-wrapper
, rustc , rustc
@ -120,7 +121,7 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
nativeBuildInputs = nativeBuildInputs ++ lib.optionals auditable [ nativeBuildInputs = nativeBuildInputs ++ lib.optionals auditable [
(cargo-auditable-cargo-wrapper.override { (cargo-auditable-cargo-wrapper.override {
inherit cargo-auditable; inherit cargo cargo-auditable;
}) })
] ++ [ ] ++ [
cacert cacert

View File

@ -81,6 +81,8 @@ in
rustPlatform = bootRustPlatform; rustPlatform = bootRustPlatform;
inherit CoreFoundation Security; 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; }; clippy = self.callPackage ./clippy.nix { inherit Security; };
}); });
}; };

View File

@ -1,6 +1,11 @@
{ buildPackages, callPackage, stdenv, runCommand }@prev: { buildPackages, callPackage, stdenv, runCommand }@prev:
{ rustc, cargo, stdenv ? prev.stdenv, ... }: { rustc
, cargo
, cargo-auditable ? null
, stdenv ? prev.stdenv
, ...
}:
rec { rec {
rust = { rust = {
@ -14,7 +19,7 @@ rec {
buildRustPackage = callPackage ../../../build-support/rust/build-rust-package { buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook 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; }; importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix { inherit cargo; };

View File

@ -15419,7 +15419,7 @@ with pkgs;
rustPackages_1_66 = rust_1_66.packages.stable; rustPackages_1_66 = rust_1_66.packages.stable;
rustPackages = rustPackages_1_66; 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 {}; makeRustPlatform = callPackage ../development/compilers/rust/make-rust-platform.nix {};
@ -15449,8 +15449,6 @@ with pkgs;
cargo-audit = callPackage ../development/tools/rust/cargo-audit { cargo-audit = callPackage ../development/tools/rust/cargo-audit {
inherit (darwin.apple_sdk.frameworks) Security; 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 { cargo-bisect-rustc = callPackage ../development/tools/rust/cargo-bisect-rustc {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
openssl = openssl_1_1; openssl = openssl_1_1;