diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-10-19 05:24:28 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-10-19 05:24:28 +0200 |
commit | 457f28f6f85eea1b1671d62d2abe39297c9c90f7 (patch) | |
tree | 3c6e68534e7bfcde19893c830af7498b0606e6d2 /pkgs/servers/monitoring/karma/generate-dependencies.sh | |
parent | a25e03e76ae1e0367419db1de009e1139d08de68 (diff) | |
parent | 1aa7d4e6c61526606d9e26f939cdb60ec8f45fcd (diff) |
Merge branch 'master' into staging-next
; Conflicts: ; pkgs/development/tools/codespell/default.nix codespell 2.2.2 switched to pyproject & setuptools_scm: https://github.com/codespell-project/codespell/pull/2523
Diffstat (limited to 'pkgs/servers/monitoring/karma/generate-dependencies.sh')
-rwxr-xr-x | pkgs/servers/monitoring/karma/generate-dependencies.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/karma/generate-dependencies.sh b/pkgs/servers/monitoring/karma/generate-dependencies.sh new file mode 100755 index 0000000000000..e37e125b7b12e --- /dev/null +++ b/pkgs/servers/monitoring/karma/generate-dependencies.sh @@ -0,0 +1,30 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p nodePackages.node2nix nodejs-18_x gnused wget + +# Usage: ./generate-dependencies.sh <version> +# Use the same version format as in ./default.nix (without the 'v') + +set -eou pipefail + +version=$1 + + +echo "Karma version: $version" +cd "$(dirname $(readlink -f $0))" + +wget -O ./package-lock.json https://raw.githubusercontent.com/prymitive/karma/v$version/ui/package-lock.json +wget -O ./package.json https://raw.githubusercontent.com/prymitive/karma/v$version/ui/package.json + +sed -i -e 's/"name": "ui",/"name": "karma-ui",/g' ./package.json +sed -i -e 's/"name": "ui",/"name": "karma-ui",/g' ./package-lock.json + +node2nix \ + --nodejs-18 \ + --development \ + -l ./package-lock.json \ + -i ./package.json \ + -o ./node-packages.nix \ + -c ./node-composition.nix \ + -e ./node-env.nix + +rm package-lock.json |