From 0dafa129ecbafde9d10ca0a712e5653444ac7af9 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 7 Jul 2026 12:27:16 +0200 Subject: [PATCH] nodejs: enable use-prefix-to-find-headers This is just a flag to allow node-gyp to find node sources automatically. This has been supported since Node.js v22 and node-gyp 10.1.0. https://github.com/nodejs/node/commit/9936d4586dcfc96cecf18fbdb65e7731ade8bbe0 https://github.com/nodejs/node-gyp/commit/329873141f0d3e3787d3c006801431da04e4ed0c This is also done on Alpine: https://github.com/alpinelinux/aports/blob/c4989684c6e9ea277530c7f3ec8c838ee0024ca0/main/nodejs/APKBUILD#L281 Signed-off-by: Sefa Eyeoglu --- pkgs/development/web/nodejs/nodejs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 22d0c3361a68..b9412696ca18 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -331,6 +331,7 @@ let ] ++ lib.optional useSharedTemporal "--v8-enable-temporal-support" ++ lib.optionals (lib.versionOlder version "19") [ "--without-dtrace" ] + ++ lib.optionals (lib.versionAtLeast version "22") [ "--use-prefix-to-find-headers" ] ++ lib.concatMap (name: [ "--shared-${name}" "--shared-${name}-libpath=${lib.getLib sharedLibDeps.${name}}/lib"