summaryrefslogtreecommitdiffstats
path: root/configs/hermes.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-20 02:16:38 +0000
committertv <tv@krebsco.de>2026-11-20 03:19:09 +0100
commit7af871c5d834acb1734e5089ca005193699b1283 (patch)
tree26bbd2855346fc78239d90a236412b7751b1c326 /configs/hermes.nix
parentc9776b0bf227599987d9e031772b3ae4399bf6d0 (diff)
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.
Diffstat (limited to 'configs/hermes.nix')
-rw-r--r--configs/hermes.nix11
1 files changed, 9 insertions, 2 deletions
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; };