This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/scripts/update-yarn.sh
Charlotte 🦝 Delenk 901489102b
All checks were successful
Hydra papermc Hydra build #48037 of nix-packages:x86_64-linux-master-pr259:papermc
Hydra mautrix-discord Hydra build #48041 of nix-packages:x86_64-linux-master-pr259:mautrix-discord
Hydra mautrix-whatsapp Hydra build #48033 of nix-packages:aarch64-linux-master-pr259:mautrix-whatsapp
Hydra woodpecker-agent Hydra build #48031 of nix-packages:aarch64-linux-master-pr259:woodpecker-agent
Hydra woodpecker-frontend Hydra build #48032 of nix-packages:aarch64-linux-master-pr259:woodpecker-frontend
Hydra element-web Hydra build #48034 of nix-packages:aarch64-linux-master-pr259:element-web
Hydra woodpecker-cli Hydra build #48035 of nix-packages:aarch64-linux-master-pr259:woodpecker-cli
Hydra woodpecker-server Hydra build #48030 of nix-packages:aarch64-linux-master-pr259:woodpecker-server
update
2023-06-08 20:02:25 +01:00

20 lines
447 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p yarn2nix nodejs yarn
SOURCE=$1
WRITE_PATH=$(realpath $2)
SOURCE_EXTRACTED=$(mktemp -du)
cp -r $SOURCE $SOURCE_EXTRACTED
chmod -R +w $SOURCE_EXTRACTED
cd $SOURCE_EXTRACTED
yarn install
yarn2nix --lockfile $SOURCE_EXTRACTED/yarn.lock > $WRITE_PATH/yarn.nix
cp $SOURCE_EXTRACTED/package.json $WRITE_PATH/package.json
cp $SOURCE_EXTRACTED/yarn.lock $WRITE_PATH/yarn.lock
rm -rf $SOURCE_EXTRACTED