Skip to content

fix: fall back to nodejs-slim.src when nodejs.src is absent#19

Closed
cameronraysmith wants to merge 1 commit intopietdevries94:mainfrom
cameronraysmith:fix-nodejs-src-symlinkjoin
Closed

fix: fall back to nodejs-slim.src when nodejs.src is absent#19
cameronraysmith wants to merge 1 commit intopietdevries94:mainfrom
cameronraysmith:fix-nodejs-src-symlinkjoin

Conversation

@cameronraysmith
Copy link

@cameronraysmith cameronraysmith commented Feb 27, 2026

NixOS/nixpkgs#481461 restructured nodejs_* from mkDerivation to symlinkJoin over nodejs-slim_*, dropping the src attribute. This breaks

tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
which extracts node sources for native binding compilation via --nodedir.

nodejs.src or pkgs.nodejs-slim.src works on nixpkgs revisions predating the change and resolves the missing attr on current nixpkgs-unstable.

nixpkgs PR 481461 restructured nodejs_* from mkDerivation to
symlinkJoin over nodejs-slim_*, removing the src attribute.
Use nix or-default to fall back to pkgs.nodejs-slim.src for
native binding compilation headers.
@cameronraysmith cameronraysmith marked this pull request as ready for review February 27, 2026 22:13
@thunze
Copy link

thunze commented Mar 9, 2026

It's a bummer that playwright-web-flake doesn't expose an overlay, otherwise the same workaround could have been easily applied in downstream flakes via overlays.

Nevermind, this seems to work as an overlay:

overlay = final: prev: {
  nodejs = prev.nodejs // {
    inherit (prev.nodejs-slim) src;
  };
  playwright-driver = final.callPackage "${playwright}/playwright-driver" { };
  playwright-test = final.callPackage "${playwright}/playwright-test/wrapped.nix" { };
};

Although it would probably still be better if playwright-web-flake just exposed an overlay because then we didn't have to replicate the callPackage logic.

@bitbloxhub
Copy link
Collaborator

With #18, it looks like this is not relevant anymore as it removes this bit of code entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants