depot/nix/pkgs/baserow/web-frontend/regen.sh

20 lines
562 B
Bash
Raw Normal View History

2021-12-20 21:05:51 +00:00
#!/usr/bin/env nix-shell
#!nix-shell -p nodePackages.node2nix -i bash
set -euo pipefail
BASEROW_SRC="$(nix-build $HOME/depot --no-out-link -A nix.pkgs.baserow.src)"
node2nix --development -i "$BASEROW_SRC/web-frontend/package.json" --nodejs-12
2021-12-20 21:05:51 +00:00
# Replace args.src with an explicit arg in node-packages.nix.
sed -E -i \
-e 's,^(\s*)src = [^{]+;,\1inherit src;,' \
-e 's|^(\{.*)\}:|\1, src}:|' \
./node-packages.nix
# Pass in src into node-packages.nix
sed -E -i \
-e 's,inherit nodeEnv;,inherit src nodeEnv;,' \
-e 's|}:$|, src}:|' \
./default.nix