nixpkgs/pkgs/by-name/ca/cargo-bisect-rustc/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.6 KiB
Nix
Raw Normal View History

2024-05-13 16:08:24 +00:00
{
stdenv,
lib,
fetchFromGitHub,
2024-05-13 16:10:12 +00:00
darwin,
2024-05-13 16:08:24 +00:00
rustPlatform,
pkg-config,
openssl,
runCommand,
patchelf,
zlib,
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-bisect-rustc";
2024-01-30 05:45:01 +00:00
version = "0.6.8";
src = fetchFromGitHub {
owner = "rust-lang";
repo = pname;
rev = "v${version}";
2024-01-30 05:45:01 +00:00
hash = "sha256-7HiM1oRuLSfRaum66duag/w8ncFdxRLF0yeSGlIey0Y=";
};
patches =
let
2024-05-13 16:08:24 +00:00
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
2023-06-07 19:39:49 +00:00
lib.optionals stdenv.hostPlatform.isLinux [ patchelfPatch ];
nativeBuildInputs = [ pkg-config ];
2023-06-07 19:39:49 +00:00
2024-05-13 16:10:12 +00:00
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
2024-01-30 05:45:01 +00:00
cargoHash = "sha256-CgEs0cejquFRY3VN6CgbE23Gipg+LEuWp/jSIkITrjw=";
2022-10-05 23:58:25 +00:00
checkFlags = [
2024-05-13 16:08:24 +00:00
"--skip test_github" # requires internet
2022-10-05 23:58:25 +00:00
];
meta = with lib; {
description = "Bisects rustc, either nightlies or CI artifacts";
mainProgram = "cargo-bisect-rustc";
2022-12-03 14:48:24 +00:00
homepage = "https://github.com/rust-lang/cargo-bisect-rustc";
2024-05-13 16:08:24 +00:00
license = with licenses; [
asl20
mit
];
maintainers = with maintainers; [ davidtwco ];
};
}