svanderburg / node2nix

Generate Nix expressions to build NPM packages
MIT License
527 stars 100 forks source link

"EACCES: permission denied" with Gatsby project #287

Open aidalgol opened 2 years ago

aidalgol commented 2 years ago

gatsby subcommands fail with a permission error when trying to operate on files under .cache in the project directory under a development nix shell.

override.nix ```nix { pkgs ? import { inherit system; }, system ? builtins.currentSystem }: let nodePackages = import ./default.nix { inherit pkgs system; }; in nodePackages // { shell = nodePackages.shell.override { buildInputs = [ pkgs.nodePackages.node-gyp-build pkgs.pkgconfig pkgs.vips pkgs.glib ]; preRebuild = '' sed -i -e "s|#!/usr/bin/env node|#! ${pkgs.nodejs}/bin/node|" node_modules/node-gyp-build/bin.js ''; shellHook = '' ln -sf $NODE_PATH node_modules ''; }; } ```