aboutsummaryrefslogtreecommitdiff
path: root/modules/matrix/pkgs/generate.sh
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2023-08-11 16:51:35 +0200
committerMax Audron <audron@cocaine.farm>2023-08-11 16:51:35 +0200
commit5828af9fc19e18dc85e49fcc1a251a7eb25d909c (patch)
treec70c3e52237c08d3fdcb2f1269c524c25e3feeb8 /modules/matrix/pkgs/generate.sh
init
Diffstat (limited to 'modules/matrix/pkgs/generate.sh')
-rwxr-xr-xmodules/matrix/pkgs/generate.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/matrix/pkgs/generate.sh b/modules/matrix/pkgs/generate.sh
new file mode 100755
index 0000000..1192e12
--- /dev/null
+++ b/modules/matrix/pkgs/generate.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p nodePackages.node2nix
+
+tag="v0.1.2"
+u="https://gitlab.com/mx-puppet/slack/mx-puppet-slack/-/raw/$tag"
+# Download package.json and patch in @slackjs/opus optional dependency
+curl $u/package.json |
+ sed 's|"typescript":.*|"typescript": "^4.8.3",|' >package.json
+
+node2nix \
+ --nodejs-14 \
+ --input package.json \
+ --strip-optional-dependencies \
+ --output node-packages.nix \
+ --composition node-composition.nix \
+ --registry https://registry.npmjs.org \
+ --registry https://gitlab.com/api/v4/packages/npm \
+ --registry-scope '@mx-puppet'
+
+rm -f package.json