nix-community / yarn2nix

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

fails with ln error #25

Open gilligan opened 7 years ago

gilligan commented 7 years ago

For me buildYarnPackage fails while building the offline derivation:

these derivations will be built:
  /nix/store/glyvw2rgb93g8yd2s9r4lz60nq1wyyd5-offline.drv
  /nix/store/9wgz1dgnsyjsn0zhhw31bcf1vihmyx3j-uf-web-app-modules.drv
  /nix/store/vz70y3v6m9jfdij26xmdmixqx1xsg8zr-uf-web-app.drv
building path(s) ‘/nix/store/9lawiqla6bcrnvsjw6hgizh8xvpxsj2f-offline’
ln: invalid option -- '2'
Try 'ln --help' for more information.
builder for ‘/nix/store/glyvw2rgb93g8yd2s9r4lz60nq1wyyd5-offline.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/9wgz1dgnsyjsn0zhhw31bcf1vihmyx3j-uf-web-app-modules.drv’: 1 dependencies co
cannot build derivation ‘/nix/store/vz70y3v6m9jfdij26xmdmixqx1xsg8zr-uf-web-app.drv’: 1 dependencies couldn't b
error: build of ‘/nix/store/vz70y3v6m9jfdij26xmdmixqx1xsg8zr-uf-web-app.drv’ failed

Sadly I cannot share the files I am trying this with. The setup is basically:

with (import ./yarn2nix.nix { inherit pkgs; });

where yarn2nix is the default.nix file from this repository. Then I just call buildYarnPackage ..

    buildYarnPackage {
      name = "app";
      src = ./.;
      packageJson = ./package.json;
      yarnLock = ./yarn.lock;
      yarnNix = ./yarn.nix;
    }

@moretea any idea what might be going on here?

zimbatm commented 7 years ago

Can you paste the yarn.lock? I am looking for weirdly-named package names.

Basically this is the line which it's tripping over:

ln -s ${deps}/node_modules/* $out/node_modules/

It's probably a globbing expansion issue, a name with spaces or with dashes.