Hey, there is one npm package that causes trouble for me when running
nix build using
buildNpmPackage in my
flake.nix file. This package is called
sharp, and here is the error message:
error: builder for '/nix/store/59qj7rbv5k376i6f1yhcfqk8pgsw4s4d-build-website.drv' failed with exit code 1; last 10 log lines: > npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) > npm ERR! sharp: Are you trying to install as a root or sudo user? > npm ERR! sharp: - For npm <= v6, try again with the "--unsafe-perm" flag > npm ERR! sharp: - For npm >= v8, the user must own the directory "npm install" is run in > npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies > npm ERR! sharp: Installation error: EACCES: permission denied, mkdir '/nix/store/077qgrp572ck9m32q7r8dcd42rcd7hzr-build-website-npm-deps/_libvips'
I think this error is quite helpful, but unfortunately I do not know how I would overcome this issue.
I will post my
flake.nix contents below, it would be much appreciated if you could show me how I have to adjust the flake for this scenario