1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 01:46:30 +00:00
nixpkgs/pkgs/servers/matrix-appservice-discord/generate.sh
pacien 9474df2285 matrix-appservice-discord: 0.5.2 -> 1.0.0
Upstream now uses Yarn instead of NPM, so we now use yarn2nix instead of
node2nix.
2020-12-27 12:56:57 +01:00

18 lines
530 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../ -i bash -p wget yarn2nix
set -euo pipefail
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates the Yarn dependency lock files for the matrix-appservice-discord package."
echo "Usage: $0 <git release tag>"
exit 1
fi
SRC_REPO="https://raw.githubusercontent.com/Half-Shot/matrix-appservice-discord/$1"
wget "$SRC_REPO/package.json" -O package.json
wget "$SRC_REPO/yarn.lock" -O yarn.lock
yarn2nix --lockfile=yarn.lock > yarn-dependencies.nix
rm yarn.lock