2021-07-16 19:40:57 +00:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell ./regen-nix.nix
|
|
|
|
#!nix-shell -i bash
|
|
|
|
|
|
|
|
node2nix \
|
2022-07-14 12:49:19 +00:00
|
|
|
--nodejs-16 \
|
2021-07-16 19:40:57 +00:00
|
|
|
--input $src/package.json \
|
|
|
|
--lock $src/package-lock.json \
|
|
|
|
--composition cypress-example-kitchensink.nix \
|
|
|
|
--development \
|
|
|
|
;
|
|
|
|
|
|
|
|
# node2nix produces opinionated expressions that work for in-repo packaging
|
|
|
|
# but aren't ideal for Nixpkgs:
|
|
|
|
sed -i cypress-example-kitchensink.nix \
|
|
|
|
-e 's^fetchgit^fetchgit callPackage^'
|
|
|
|
sed -i node-packages.nix \
|
|
|
|
-e 's^fetchgit, ^fetchgit, callPackage, ^' \
|
|
|
|
-e 's^src = .*/nix/store/.*-source^src = callPackage ./src.nix {}^' \
|
|
|
|
-e 's^nix-gitignore.gitignoreSourcePure^(ignore: src: src)^' \
|
|
|
|
;
|