From e594a0fc14f457b554dce4c7bf8a8174f495a389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 10 Aug 2023 01:59:29 +0200 Subject: [PATCH] cargo-auditable: fix cross compilation This fixes the following error: ... cargo-auditable> Doc-tests auditable-extract cargo-auditable> error: doctest failed, to rerun pass `-p auditable-extract --doc` cargo-auditable> cargo-auditable> Caused by: cargo-auditable> could not execute process `rustdoc --edition=2018 --crate-type lib --crate-name auditable_extract --test /build/source/auditable-extract/src/lib.rs --target x86_64-unknown-linux-gnu -L dependency=/build/source/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/build/source/target/release/deps --test-args --test-threads=96 --extern auditable_extract=/build/source/target/x86_64-unknown-linux-gnu/release/deps/libauditable_extract-dd1904617e4b78db.rlib --extern binfarce=/build/source/target/x86_64-unknown-linux-gnu/release/deps/libbinfarce-2ba09d21aed0de1a.rlib -C embed-bitcode=no --error-format human` (never executed) cargo-auditable> cargo-auditable> Caused by: cargo-auditable> No such file or directory (os error 2) Tested with lanzaboote --- pkgs/development/compilers/rust/cargo-auditable.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/rust/cargo-auditable.nix b/pkgs/development/compilers/rust/cargo-auditable.nix index dbbfff4dc6b6..b86ed5d7d4e1 100644 --- a/pkgs/development/compilers/rust/cargo-auditable.nix +++ b/pkgs/development/compilers/rust/cargo-auditable.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, makeRustPlatform, rustc, cargo, installShellFiles, stdenv }: +{ lib, buildPackages, fetchFromGitHub, makeRustPlatform, installShellFiles, stdenv }: let args = rec { @@ -30,8 +30,8 @@ let }; rustPlatform = makeRustPlatform { - inherit rustc; - cargo = cargo.override { + inherit (buildPackages) rustc; + cargo = buildPackages.cargo.override { auditable = false; }; };