Merge pull request #227683 from amjoseph-nixpkgs/pr/cargo/unbreak-cross

This commit is contained in:
figsoda 2023-04-22 19:13:19 -04:00 committed by GitHub
commit 4b5d340902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, makeRustPlatform, rustc, cargo, installShellFiles }:
{ lib, fetchFromGitHub, makeRustPlatform, rustc, cargo, installShellFiles, stdenv }:
let
args = rec {
@ -25,6 +25,7 @@ let
changelog = "https://github.com/rust-secure-code/cargo-auditable/blob/v${version}/cargo-auditable/CHANGELOG.md";
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ figsoda ];
broken = stdenv.hostPlatform != stdenv.buildPlatform;
};
};

View File

@ -1,14 +1,15 @@
{ lib, stdenv, pkgsBuildHost, pkgsHostHost
, file, curl, pkg-config, python3, openssl, cmake, zlib
, installShellFiles, makeWrapper, rustPlatform, rustc
, installShellFiles, makeWrapper, rustPlatform, rust, rustc
, CoreFoundation, Security
, auditable ? true
, auditable ? !cargo-auditable.meta.broken
, cargo-auditable
, pkgsBuildBuild
}:
rustPlatform.buildRustPackage.override {
cargo-auditable = cargo-auditable.bootstrap;
} {
} ({
pname = "cargo";
inherit (rustc) version src;
@ -113,3 +114,6 @@ rustPlatform.buildRustPackage.override {
platforms = platforms.unix;
};
}
// lib.optionalAttrs (rust.toRustTarget stdenv.buildPlatform != rust.toRustTarget stdenv.hostPlatform) {
HOST_PKG_CONFIG_PATH="${pkgsBuildBuild.pkg-config}/bin/pkg-config";
})