From b6baf590f33320c12da2ca248d0a0089018bfca9 Mon Sep 17 00:00:00 2001 From: SandaruKasa Date: Sat, 28 Mar 2026 22:48:38 +0300 Subject: [PATCH 1/3] cargo-bisect-rustc: add myself as a maintainer --- pkgs/by-name/ca/cargo-bisect-rustc/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ca/cargo-bisect-rustc/package.nix b/pkgs/by-name/ca/cargo-bisect-rustc/package.nix index b0f4f9b78297..960350f94d4a 100644 --- a/pkgs/by-name/ca/cargo-bisect-rustc/package.nix +++ b/pkgs/by-name/ca/cargo-bisect-rustc/package.nix @@ -58,6 +58,6 @@ rustPlatform.buildRustPackage (finalAttrs: { asl20 mit ]; - maintainers = [ ]; + maintainers = with lib.maintainers; [ sandarukasa ]; }; }) From 6e86bbb0d027c8a06582f35fb7a0ecba2ab4b6ce Mon Sep 17 00:00:00 2001 From: SandaruKasa Date: Sat, 28 Mar 2026 22:54:32 +0300 Subject: [PATCH 2/3] cargo-bisect-rustc: use nix-update-script --- pkgs/by-name/ca/cargo-bisect-rustc/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/ca/cargo-bisect-rustc/package.nix b/pkgs/by-name/ca/cargo-bisect-rustc/package.nix index 960350f94d4a..c7b9977402fc 100644 --- a/pkgs/by-name/ca/cargo-bisect-rustc/package.nix +++ b/pkgs/by-name/ca/cargo-bisect-rustc/package.nix @@ -8,6 +8,7 @@ runCommand, patchelf, zlib, + nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -50,6 +51,10 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=test_github" # requires internet ]; + passthru = { + updateScript = nix-update-script { }; + }; + meta = { description = "Bisects rustc, either nightlies or CI artifacts"; mainProgram = "cargo-bisect-rustc"; From 623ada32eee255716ba43eca26c95d8ccbaab30d Mon Sep 17 00:00:00 2001 From: SandaruKasa Date: Sat, 28 Mar 2026 22:42:09 +0300 Subject: [PATCH 3/3] cargo-bisect-rustc: 0.6.8 -> 0.6.11 Diff: https://github.com/rust-lang/cargo-bisect-rustc/compare/v0.6.8...v0.6.11 --- .../0001-dynamically-patchelf-binaries.patch | 26 ++++++++++++------- .../by-name/ca/cargo-bisect-rustc/package.nix | 7 ++--- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/ca/cargo-bisect-rustc/0001-dynamically-patchelf-binaries.patch b/pkgs/by-name/ca/cargo-bisect-rustc/0001-dynamically-patchelf-binaries.patch index 3df226835ab9..5516cc42cbfe 100644 --- a/pkgs/by-name/ca/cargo-bisect-rustc/0001-dynamically-patchelf-binaries.patch +++ b/pkgs/by-name/ca/cargo-bisect-rustc/0001-dynamically-patchelf-binaries.patch @@ -1,17 +1,19 @@ diff --git a/src/toolchains.rs b/src/toolchains.rs -index 53a7ddb..795a711 100644 +index a4be8cdcfe..b3e4dc3cee 100644 --- a/src/toolchains.rs +++ b/src/toolchains.rs -@@ -206,6 +206,8 @@ impl Toolchain { +@@ -208,7 +208,9 @@ })?; } -+ nix_patchelf(tmpdir.path().to_path_buf()) -+ .expect("failed to patch toolchain for NixOS"); - fs::rename(tmpdir.into_path(), dest).map_err(InstallError::Move) +- fs::rename(tmpdir.keep(), dest).map_err(InstallError::Move) ++ let tmpdir = tmpdir.keep(); ++ nix_patchelf(tmpdir.clone()).expect("failed to patch toolchain for NixOS"); ++ fs::rename(tmpdir, dest).map_err(InstallError::Move) } -@@ -533,3 +535,42 @@ fn download_tarball( + pub(crate) fn remove(&self, dl_params: &DownloadParams) -> io::Result<()> { +@@ -564,3 +566,46 @@ res => res, } } @@ -25,8 +27,10 @@ index 53a7ddb..795a711 100644 + continue; + } + -+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}", -+ entry.path().to_str().unwrap()); ++ eprintln!( ++ "info: you seem to be running NixOS. Attempting to patch {}", ++ entry.path().to_str().unwrap() ++ ); + let _ = ::std::process::Command::new("@patchelf@/bin/patchelf") + .arg("--set-interpreter") + .arg("@dynamicLinker@") @@ -43,8 +47,10 @@ index 53a7ddb..795a711 100644 + continue; + } + -+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}", -+ entry.path().to_str().unwrap()); ++ eprintln!( ++ "info: you seem to be running NixOS. Attempting to patch {}", ++ entry.path().to_str().unwrap() ++ ); + let _ = ::std::process::Command::new("@patchelf@/bin/patchelf") + .arg("--set-rpath") + .arg("@libPath@") diff --git a/pkgs/by-name/ca/cargo-bisect-rustc/package.nix b/pkgs/by-name/ca/cargo-bisect-rustc/package.nix index c7b9977402fc..c78bd30d6d76 100644 --- a/pkgs/by-name/ca/cargo-bisect-rustc/package.nix +++ b/pkgs/by-name/ca/cargo-bisect-rustc/package.nix @@ -13,13 +13,13 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cargo-bisect-rustc"; - version = "0.6.8"; + version = "0.6.11"; src = fetchFromGitHub { owner = "rust-lang"; repo = "cargo-bisect-rustc"; rev = "v${finalAttrs.version}"; - hash = "sha256-7HiM1oRuLSfRaum66duag/w8ncFdxRLF0yeSGlIey0Y="; + hash = "sha256-uyIdQn9EQnjBAHBPqvphaKg2KRufveOXOiHEKk0fTGQ="; }; patches = @@ -45,10 +45,11 @@ rustPlatform.buildRustPackage (finalAttrs: { buildInputs = [ openssl ]; - cargoHash = "sha256-SigRm2ZC7jH1iCEGRpka1G/e9kBEieFVU0YDBl2LfTM="; + cargoHash = "sha256-WSO5LvdJkAorSwsICz9NAWKNM7x4aeNvhGLhJSO6Vi8="; checkFlags = [ "--skip=test_github" # requires internet + "--skip=cli_tests" # trycmd does not seem to work in nix's sandbox ]; passthru = {