node2nix
node2nix copied to clipboard
some packages fail their postinstall due to missing opencollective
Due to node2nix 1.7.0 fixing #122 it becomes possible to generate the .nix files for https://github.com/bitwarden/web, but when trying to build the package afterwards with nix-build -A package, it fails on the following error:
> [email protected] postinstall /nix/store/4wad5rffnq56mx5r366dn0jsmkx41gsc-node_bitwarden-web-2.10.1/lib/node_modules/bitwarden-web/node_modules/ngx-infinite-scroll
> opencollective postinstall
sh: opencollective: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `opencollective postinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /build/.npm/_logs/2019-06-05T22_58_27_141Z-debug.log
builder for '/nix/store/jgmc8c0nhbir2w9mb183l204axi8gv05-node_bitwarden-web-2.10.1.drv' failed with exit code 1
error: build of '/nix/store/jgmc8c0nhbir2w9mb183l204axi8gv05-node_bitwarden-web-2.10.1.drv' failed
The use of opencollective seems not unique to that particular nodejs package, but is more common among nodejs packages.
I haven't been able to answer this yet, but at first sight it might be fixable by adding a supplement JSON file that adds opencollective as a global dependency.
@msteen does adding the opencollective package as a supplement work for you?