about summary refs log tree commit diff
path: root/pkgs/development/web/cypress/cypress-example-kitchensink/regen-nix
blob: ba35dafe5269e43fc7481875ffaad506c9fca11d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env nix-shell
#!nix-shell ./regen-nix.nix
#!nix-shell -i bash

node2nix \
  --nodejs-16 \
  --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)^' \
  ;