From 87f679dc0a945d8664ffa34bdda7b8147b7e2656 Mon Sep 17 00:00:00 2001 From: Bryan Lai Date: Tue, 22 Jul 2025 19:33:01 +0800 Subject: [PATCH] hydra-check: patch to fix x86_64-darwin, rust 1.88 Co-authored-by: Doron Behar --- .../hy/hydra-check/fix-cargo-1_88-reqwest.patch | 15 +++++++++++++++ pkgs/by-name/hy/hydra-check/package.nix | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/by-name/hy/hydra-check/fix-cargo-1_88-reqwest.patch diff --git a/pkgs/by-name/hy/hydra-check/fix-cargo-1_88-reqwest.patch b/pkgs/by-name/hy/hydra-check/fix-cargo-1_88-reqwest.patch new file mode 100644 index 000000000000..5e551621e757 --- /dev/null +++ b/pkgs/by-name/hy/hydra-check/fix-cargo-1_88-reqwest.patch @@ -0,0 +1,15 @@ +diff --git a/Cargo.toml b/Cargo.toml +index bb8d370..7c5b7ac 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -35,6 +35,10 @@ anyhow = "1.0.89" + insta.opt-level = 3 + similar.opt-level = 3 + ++# work around https://github.com/NixOS/nixpkgs/issues/427072 ++[profile.release.package.hyper] ++opt-level = 0 ++ + [lints.clippy] + pedantic = { level = "warn", priority = -1 } + cargo = { level = "warn", priority = -1 } diff --git a/pkgs/by-name/hy/hydra-check/package.nix b/pkgs/by-name/hy/hydra-check/package.nix index 10c3b31c195a..0878bdd4dd25 100644 --- a/pkgs/by-name/hy/hydra-check/package.nix +++ b/pkgs/by-name/hy/hydra-check/package.nix @@ -23,6 +23,15 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoHash = "sha256-G9M+1OWp2jlDeSDFagH/YOCdxGQbcru1KFyKEUcMe7g="; + patches = + lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") + # work around rust 1.88 compiler / linker bug for x86_64-darwin. This is + # applied conditionally because it will introduce a performance penalty on + # other host platforms. NOTE: Please check the patch applies if you update + # the package on a different platform (e.g x86_64-linux). + # see: https://github.com/NixOS/nixpkgs/issues/427072 + ./fix-cargo-1_88-reqwest.patch; + nativeBuildInputs = [ pkg-config installShellFiles