nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at litex 62 lines 1.5 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, rustPlatform 5, pkg-config 6, openssl 7, runCommand 8, patchelf 9, zlib 10, Security 11}: 12 13rustPlatform.buildRustPackage rec { 14 pname = "cargo-bisect-rustc"; 15 version = "0.6.6"; 16 17 src = fetchFromGitHub { 18 owner = "rust-lang"; 19 repo = pname; 20 rev = "v${version}"; 21 hash = "sha256-i/MZslGbv72MZmd31SQFc2QdDRigs8edyN2/T5V5r4k="; 22 }; 23 24 patches = 25 let 26 patchelfPatch = runCommand "0001-dynamically-patchelf-binaries.patch" 27 { 28 CC = stdenv.cc; 29 patchelf = patchelf; 30 libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}"; 31 } 32 '' 33 export dynamicLinker=$(cat $CC/nix-support/dynamic-linker) 34 substitute ${./0001-dynamically-patchelf-binaries.patch} $out \ 35 --subst-var patchelf \ 36 --subst-var dynamicLinker \ 37 --subst-var libPath 38 ''; 39 in 40 lib.optionals stdenv.isLinux [ patchelfPatch ]; 41 42 nativeBuildInputs = [ pkg-config ]; 43 44 buildInputs = [ 45 openssl 46 ] ++ lib.optionals stdenv.isDarwin [ 47 Security 48 ]; 49 50 cargoHash = "sha256-dnR0V2MvW4Z3jtsjXSboCRFNb22fDGu01fC40N2Deho="; 51 52 checkFlags = [ 53 "--skip test_github" # requires internet 54 ]; 55 56 meta = with lib; { 57 description = "Bisects rustc, either nightlies or CI artifacts"; 58 homepage = "https://github.com/rust-lang/cargo-bisect-rustc"; 59 license = with licenses; [ asl20 mit ]; 60 maintainers = with maintainers; [ davidtwco ]; 61 }; 62}