From 7af871c5d834acb1734e5089ca005193699b1283 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Nov 2026 02:16:38 +0000 Subject: configs/hermes: don't patch nixos-26.05's patchelf hermes-agent patches patchelf for a bug of 0.19 (NixOS/patchelf#674). nixos-26.05's patchelf is 0.15, which doesn't have that bug, and the patch fails to apply to it. Make overrideAttrs a no-op on a patchelf older than 0.19, in the pkgs only hermes-agent's flake sees. --- configs/hermes.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'configs') diff --git a/configs/hermes.nix b/configs/hermes.nix index 0f3a79c..ea1fd9b 100644 --- a/configs/hermes.nix +++ b/configs/hermes.nix @@ -31,12 +31,19 @@ let _type = "flake"; outPath = pkgs.path; inherit (pkgs) lib; + # For nixos-26.05, which hermes-agent doesn't target. legacyPackages.${pkgs.stdenv.hostPlatform.system} = pkgs.extend (_: prev: { - # For nixos-26.05: its fetchPnpmDeps overrides nodejs-slim in a pnpm - # >= 11, but hermes-agent's pnpm 12 is a plain attrset with that. + # Its fetchPnpmDeps overrides nodejs-slim in a pnpm >= 11, but + # hermes-agent's pnpm 12 is a plain attrset with that. fetchPnpmDeps = args: prev.fetchPnpmDeps (args // { pnpm = args.pnpm // { override = attrs: args.pnpm // attrs; }; }); + # hermes-agent patches a bug of patchelf 0.19 that its 0.15 doesn't + # have, and the patch doesn't apply to it. + patchelf = + if lib.versionOlder prev.patchelf.version "0.19" + then prev.patchelf // { overrideAttrs = _: prev.patchelf; } + else prev.patchelf; }); }; pyproject-nix = callFlake (input "pyproject-nix") { inherit nixpkgs; }; -- cgit v1.3.1