cargo-bisect-rustc: nixfmt-rfc-style

This commit is contained in:
Raghav Sood
2024-05-14 00:08:24 +08:00
parent 7325d7ec2d
commit 891fee7487
@@ -1,13 +1,14 @@
{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, openssl
, runCommand
, patchelf
, zlib
, Security
{
stdenv,
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
runCommand,
patchelf,
zlib,
Security,
}:
rustPlatform.buildRustPackage rec {
@@ -23,41 +24,41 @@ 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 [ Security ];
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 ];
};
}