mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
31 lines
862 B
Bash
Executable File
31 lines
862 B
Bash
Executable File
#! /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
|