-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mx-puppet-discord: update to 0.1.1 and fix for node2nix npmv7 update
- Loading branch information
1 parent
e70290e
commit 1f067ee
Showing
4 changed files
with
1,170 additions
and
1,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
#!/usr/bin/env nix-shell | ||
#! nix-shell -i bash -p nodePackages.node2nix | ||
|
||
# No official release | ||
rev=bb6438a504182a7a64048b992179427587ccfded | ||
u=https://raw.githubusercontent.com/matrix-discord/mx-puppet-discord/$rev | ||
# Download package.json and package-lock.json | ||
curl -O $u/package.json | ||
curl $u/package-lock.json | | ||
sed -e 's|git+ssh://git@|git+https://|g' > package-lock.json | ||
tag="v0.1.1" | ||
u="https://gitlab.com/mx-puppet/discord/mx-puppet-discord/-/raw/$tag" | ||
# Download package.json and patch in @discordjs/opus optional dependency | ||
curl $u/package.json | | ||
sed 's|"typescript": *"\^\?3\.[^"]*"|"typescript": "^4.8.3"|' | # TODO: remove when newer typescript version pinned | ||
sed 's|\("dependencies": *{\)|\1\n"@discordjs/opus": "^0.8.0",|' >package.json | ||
|
||
node2nix \ | ||
--nodejs-14 \ | ||
--node-env ../../development/node-packages/node-env.nix \ | ||
--input package.json \ | ||
--lock package-lock.json \ | ||
--strip-optional-dependencies \ | ||
--output node-packages.nix \ | ||
--composition node-composition.nix | ||
--composition node-composition.nix \ | ||
--registry https://registry.npmjs.org \ | ||
--registry https://gitlab.com/api/v4/packages/npm \ | ||
--registry-scope '@mx-puppet' | ||
|
||
sed -i 's|<nixpkgs>|../../..|' node-composition.nix | ||
|
||
rm -f package.json package-lock.json | ||
rm -f package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.