1 #!/usr/bin/env nix-shell
2 #! nix-shell -i bash -p nodePackages.node2nix
5 u
="https://gitlab.com/mx-puppet/discord/mx-puppet-discord/-/raw/$tag"
6 # Download package.json and patch in @discordjs/opus optional dependency
8 sed 's|"typescript": *"\^\?3\.[^"]*"|"typescript": "^4.8.3"|' |
# TODO: remove when newer typescript version pinned
9 sed 's|\("dependencies": *{\)|\1\n"@discordjs/opus": "^0.8.0",|' >package.json
13 --node-env ..
/..
/development
/node-packages
/node-env.nix \
14 --input package.json \
15 --strip-optional-dependencies \
16 --output node-packages.nix \
17 --composition node-composition.nix \
18 --registry https
://registry.npmjs.org \
19 --registry https
://gitlab.com
/api
/v
4/packages
/npm \
20 --registry-scope '@mx-puppet'
22 sed -i 's|<nixpkgs>|../../..|' node-composition.nix