mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #311380 from RaghavSood/cargo-bisect-rustc/fix-build
cargo-bisect-rustc: fix darwin build
This commit is contained in:
commit
8225d5eaef
@ -1,13 +1,14 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, openssl
|
||||
, runCommand
|
||||
, patchelf
|
||||
, zlib
|
||||
, Security
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
darwin,
|
||||
rustPlatform,
|
||||
pkg-config,
|
||||
openssl,
|
||||
runCommand,
|
||||
patchelf,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@ -23,41 +24,46 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
patches =
|
||||
let
|
||||
patchelfPatch = runCommand "0001-dynamically-patchelf-binaries.patch"
|
||||
{
|
||||
CC = stdenv.cc;
|
||||
patchelf = patchelf;
|
||||
libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
|
||||
}
|
||||
''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var libPath
|
||||
'';
|
||||
patchelfPatch =
|
||||
runCommand "0001-dynamically-patchelf-binaries.patch"
|
||||
{
|
||||
CC = stdenv.cc;
|
||||
patchelf = patchelf;
|
||||
libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
|
||||
}
|
||||
''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var libPath
|
||||
'';
|
||||
in
|
||||
lib.optionals stdenv.isLinux [ patchelfPatch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Security
|
||||
];
|
||||
buildInputs =
|
||||
[ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
darwin.apple_sdk.frameworks.SystemConfiguration
|
||||
];
|
||||
|
||||
cargoHash = "sha256-CgEs0cejquFRY3VN6CgbE23Gipg+LEuWp/jSIkITrjw=";
|
||||
|
||||
checkFlags = [
|
||||
"--skip test_github" # requires internet
|
||||
"--skip test_github" # requires internet
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bisects rustc, either nightlies or CI artifacts";
|
||||
mainProgram = "cargo-bisect-rustc";
|
||||
homepage = "https://github.com/rust-lang/cargo-bisect-rustc";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
};
|
||||
}
|
||||
|
@ -16612,9 +16612,7 @@ with pkgs;
|
||||
};
|
||||
cargo-benchcmp = callPackage ../development/tools/rust/cargo-benchcmp { };
|
||||
cargo-binstall = callPackage ../development/tools/rust/cargo-binstall { };
|
||||
cargo-bisect-rustc = callPackage ../development/tools/rust/cargo-bisect-rustc {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
cargo-bisect-rustc = callPackage ../development/tools/rust/cargo-bisect-rustc { };
|
||||
cargo-bitbake = callPackage ../development/tools/rust/cargo-bitbake { };
|
||||
cargo-c = callPackage ../development/tools/rust/cargo-c {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
||||
|
Loading…
Reference in New Issue
Block a user