vscode-extensions.capatech.betacode: init at 0.1.10 (#355720)
[NixPkgs.git] / pkgs / servers / mx-puppet-discord / generate.sh
blobefad3326002a35c0b5c420306ca591b70abc0819
1 #!/usr/bin/env nix-shell
2 #! nix-shell -i bash -p nodePackages.node2nix
4 tag="v0.1.1"
5 u="https://gitlab.com/mx-puppet/discord/mx-puppet-discord/-/raw/$tag"
6 # Download package.json and patch in @discordjs/opus optional dependency
7 curl $u/package.json |
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
11 node2nix \
12 --nodejs-14 \
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/v4/packages/npm \
20 --registry-scope '@mx-puppet'
22 sed -i 's|<nixpkgs>|../../..|' node-composition.nix
24 rm -f package.json