nixpkgs/pkgs/development/web/cypress/cypress-example-kitchensink/regen-nix
2021-07-15 10:40:10 +02:00

21 lines
642 B
Text
Executable file

#!/usr/bin/env nix-shell
#!nix-shell ./regen-nix.nix
#!nix-shell -i bash
node2nix \
--nodejs-12 \
--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)^' \
;