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