From effc9ce2e66c9024b3e63c04083b457b7b542004 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 22 Feb 2026 21:06:51 +0200 Subject: [PATCH 1/3] doc/javascript: update link to plausible example --- doc/languages-frameworks/javascript.section.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 1cbc02a69cf1..37091d94cf66 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -89,6 +89,7 @@ Exceptions to this rule are: Each tool has an abstraction to just build the node_modules (dependencies) directory. You can always use the `stdenv.mkDerivation` with the node_modules to build the package (symlink the node_modules directory and then use the package build command). The node_modules abstraction can be also used to build some web framework frontends. +For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix) is built. `mkYarnModules` to make the derivation containing node_modules. Then when building the frontend you can just symlink the node_modules directory. ## Tool-specific instructions {#javascript-tool-specific} From 5794e1209a2690f5b558512b3f4fd080baa2f6b8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 22 Feb 2026 21:20:58 +0200 Subject: [PATCH 2/3] doc/beam: update docs for mixRelease frontend deps Fixup to: https://github.com/NixOS/nixpkgs/commit/c4574a95c510c6f99051e1c3396aba5e2e6952b1 --- doc/languages-frameworks/beam.section.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/languages-frameworks/beam.section.md b/doc/languages-frameworks/beam.section.md index 33fa5128ea44..7b643efa30d8 100644 --- a/doc/languages-frameworks/beam.section.md +++ b/doc/languages-frameworks/beam.section.md @@ -93,7 +93,7 @@ there are 3 steps: frontend dependencies (javascript), backend dependencies (eli ##### mixRelease - Frontend dependencies (javascript) {#mix-release-javascript-deps} -For phoenix projects, inside of Nixpkgs you can either use yarn2nix (mkYarnModule) or node2nix. An example with yarn2nix can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix#L39). An example with node2nix will follow. To package something outside of nixpkgs, you have alternatives like [npmlock2nix](https://github.com/nix-community/npmlock2nix) or [nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage) +For phoenix projects, inside of Nixpkgs you can either use `fetchYarnDeps` or `buildNpmPackage`. An example with `fetchYarnDeps` can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix). An example with `fetchYarnDeps` will follow. To package something outside of nixpkgs, you have alternatives like [npmlock2nix](https://github.com/nix-community/npmlock2nix) or [nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage) ##### mixRelease - backend dependencies (mix) {#mix-release-mix-deps} From 7add9a7657786437506c57f18dedbcf3c3a588d2 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 22 Feb 2026 21:28:16 +0200 Subject: [PATCH 3/3] yarn2nix: remove more mentions of it --- doc/languages-frameworks/javascript.section.md | 2 +- pkgs/build-support/node/fetch-yarn-deps/common.js | 2 -- pkgs/by-name/mq/mqtt-explorer/package.nix | 2 +- pkgs/by-name/sp/splayer/package.nix | 1 - pkgs/by-name/ta/taler-wallet-core/package.nix | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 37091d94cf66..abacb7e2f9c8 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -89,7 +89,7 @@ Exceptions to this rule are: Each tool has an abstraction to just build the node_modules (dependencies) directory. You can always use the `stdenv.mkDerivation` with the node_modules to build the package (symlink the node_modules directory and then use the package build command). The node_modules abstraction can be also used to build some web framework frontends. -For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix) is built. `mkYarnModules` to make the derivation containing node_modules. +For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix) is built. Then when building the frontend you can just symlink the node_modules directory. ## Tool-specific instructions {#javascript-tool-specific} diff --git a/pkgs/build-support/node/fetch-yarn-deps/common.js b/pkgs/build-support/node/fetch-yarn-deps/common.js index 7f56ec26f491..08168a508760 100644 --- a/pkgs/build-support/node/fetch-yarn-deps/common.js +++ b/pkgs/build-support/node/fetch-yarn-deps/common.js @@ -1,7 +1,5 @@ const path = require('path') -// This has to match the logic in pkgs/development/tools/yarn2nix-moretea/yarn2nix/lib/urlToName.js -// so that fixup_yarn_lock produces the same paths const urlToName = url => { const isCodeloadGitTarballUrl = url.startsWith('https://codeload.github.com/') && url.includes('/tar.gz/') diff --git a/pkgs/by-name/mq/mqtt-explorer/package.nix b/pkgs/by-name/mq/mqtt-explorer/package.nix index f529f3a7e043..e5a0d9c9dbfa 100644 --- a/pkgs/by-name/mq/mqtt-explorer/package.nix +++ b/pkgs/by-name/mq/mqtt-explorer/package.nix @@ -13,7 +13,7 @@ copyDesktopItems, }: # NOTE mqtt-explorer has 3 yarn subpackages and uses relative links -# between them, which makes it hard to package them via 3 `mkYarnPackage` +# between them, which makes it hard to package them via 3 `fetchYarnDeps` # since the resulting `node_modules` directories don't have the same structure # as if they were installed directly. Hence why we opted to use a # `stdenv.mkDerivation` instead. diff --git a/pkgs/by-name/sp/splayer/package.nix b/pkgs/by-name/sp/splayer/package.nix index f38577f328ea..7508ecf07a87 100644 --- a/pkgs/by-name/sp/splayer/package.nix +++ b/pkgs/by-name/sp/splayer/package.nix @@ -91,7 +91,6 @@ stdenv.mkDerivation (finalAttrs: { # of better-sqlite3. It has a native part that it wants to build using a # script which is disallowed. # What's more, we need to use headers from electron to avoid ABI mismatches. - # Adapted from mkYarnModules. for f in $(find . -path '*/node_modules/better-sqlite3' -type d); do (cd "$f" && ( npm run build-release --offline --nodedir="${electron.headers}" diff --git a/pkgs/by-name/ta/taler-wallet-core/package.nix b/pkgs/by-name/ta/taler-wallet-core/package.nix index ca4a6daed17f..6572819dde8a 100644 --- a/pkgs/by-name/ta/taler-wallet-core/package.nix +++ b/pkgs/by-name/ta/taler-wallet-core/package.nix @@ -89,7 +89,6 @@ stdenv.mkDerivation (finalAttrs: { # After the pnpm configure, we need to build the binaries of all instances # of better-sqlite3. It has a native part that it wants to build using a # script which is disallowed. - # Adapted from mkYarnModules. preBuild = '' for f in $(find -path '*/node_modules/better-sqlite3' -type d); do (cd "$f" && (