yarnpnp2nix icon indicating copy to clipboard operation
yarnpnp2nix copied to clipboard

A performance focused and space efficient way of packaging NodeJS applications with Nix

Results 14 yarnpnp2nix issues
Sort by recently updated
recently updated
newest added

Fixes #17 Starting with Nix 2.19 (released November 2023), [leading dots are not allowed in store paths anymore](https://github.com/NixOS/nix/pull/9095). While @edef1c stated in her PR that "it's unlikely anyone is relying...

I've tried migrating my react project with workspaces to yarnpnp2nix, but encountered error during package building with nix build ` … while evaluating attribute 'unplugPhase' of derivation 'babel-helper-compilation-targets-7.23.6-aa6f07f088' at /nix/store/mmihlxna7x7wryngb0h47n0ssbravph0-source/lib/mkYarnPackage.nix:309:9:...

As of Nix 2.19, leading dots are not allowed in store path names: https://github.com/NixOS/nix/pull/9095 This cause issues with the pnp loader: ``` error: store path 'vpl7h5psym1p892kk0k1xagwn48490ja-.pnp.loader.mjs' starts with illegal character...

as it leads to hash mismatch errors due to inability to predict the hash of a FOD for all platforms and hence bad user experience FODs are also not rebuilt...

also: 1. [package runTests.sh with nix](https://github.com/madjam002/yarnpnp2nix/pull/11/commits/abc0349b8f7c41d9640a7be5f3b3cebaca50d55d) so that it works event if user does't have jq installed locally 2. [gitignore: add test/workspace/.yarn/cache/](https://github.com/madjam002/yarnpnp2nix/pull/11/commits/c2b54eec0025e69aafa0f878777d69df53921fcf) EDIT: also see [this commit](https://github.com/rhinofi/yarnpnp2nix/commit/e90e70cec9cdbaad638e61b525175678021ed98b), which fixes `shell.nix`,...

would you be open to a PR simplifying some of the nix code, to make it more readable? For example: https://github.com/madjam002/yarnpnp2nix/blob/ac8dc416332a66d16eb3405f1e8cee89c2fa1b5f/lib/mkYarnPackage.nix#L117 could be rewritten to: ```nix _outputHash = packageManifest.outputHash or...

``` error: hash mismatch in fixed-output derivation '/nix/store/6hhh94ldl0555ddh9w5vlw8p6v4nn8z3-esbuild-linux-64-0.15.10-702e43a31d.drv': specified: sha512-H6P3xJuvxQ6JN1xAWDjZGRlHCgBju4iJZlvlhrUnDsqD1ZLZhd7gKYuN+ALWIRW+zxVqYAN9rLTKKZE5SECjXg== got: sha512-DN7uyk6C+SwXhiz7do0pu8+naQBURMYqDNb8EFzdH34fkeqz2dCiT88mxJV14y6hRIGHWbukh5KEgWLxH9AvLQ== error: 1 dependencies of derivation '/nix/store/8gvrlx95892qnbv343077ym7g6p36hfr-testb-0.0.0-819008c351.drv' failed to build ``` btw. the script assumes `jq` is installed, which...

Currently, the yarn plugin generates invalid nix paths when package revisions with paths (i.e. `workspace:` and `patch:` protocols) contain nix store illegal characters. This is really annoying when patching scoped...

The package could be fetched in a FOD derivation and then patched in a separate derivation with no outputHash needed.

When using `yarn` inside a build script, e.g. ``` "testb@workspace:packages/testb" = { build = '' yarn build # defined in package.json as `node build.js` ''; }; ``` The following error...