nix-community / yarn2nix

Generate nix expressions from a yarn.lock file [maintainer=???]
GNU General Public License v3.0
123 stars 61 forks source link

mkYarnWorkspace ignores workspace paths which yarn would ignore #89

Open nicknovitski opened 5 years ago

nicknovitski commented 5 years ago

Directories which match the workspace globs are ignored if:

(Yarn ignores these, either silently or with a warning)

nicknovitski commented 5 years ago

Hmm. This doesn't work with one of our workspace repositories.

e: example removed and replaced with a new failing test

nicknovitski commented 5 years ago

I added a failing test using facebook/nuclide.

nicknovitski commented 5 years ago
error: while evaluating 'mkYarnWorkspace' at /home/travis/build/moretea/yarn2nix/default.nix:144:21, called from /home/travis/build/moretea/yarn2nix/tests/default.nix:24:12:
while evaluating 'validPackage' at /home/travis/build/moretea/yarn2nix/default.nix:170:20, called from undefined position:
string '/nix/store/sajg9gp91rhhn9yyvlrzbfdsp8ypvr44-source/modules/atom-ide-debugger-java/package.json' cannot refer to other paths, at /home/travis/build/moretea/yarn2nix/default.nix:175:9

Very strange. It's possible to use import and readFile on derivations, but not pathExists? I'm trying very hard to find something I did wrong, but if I can't then I think it's an issue with nix.