-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #169: Update spark-wallet 0.2.13 -> 0.2.14
8b2ae9c spark-wallet: update 0.2.13 -> 0.2.14 (nixbitcoin) Pull request description: Top commit has no ACKs. Tree-SHA512: 3f9189d20f21f9fb569d0819102817899436877a1291d69339604a098f15ef836a5072b0054960ec2cd6dfe35732f5f9fbe490c512dfa6266a65698fc5987f91
- Loading branch information
Showing
3 changed files
with
71 additions
and
251 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
#!/usr/bin/env nix-shell | ||
#! nix-shell -i bash -p nodePackages.node2nix | ||
exec node2nix --nodejs-10 -i pkg.json -c composition.nix --no-copy-node-env --supplement-input supplement.json | ||
#! nix-shell -i bash -p nodePackages.node2nix gnupg wget jq moreutils | ||
set -euo pipefail | ||
|
||
TMPDIR="$(mktemp -d -p /tmp)" | ||
trap "rm -rf $TMPDIR" EXIT | ||
|
||
# Get/verify spark-wallet-npm.tgz | ||
version="0.2.14" | ||
export GNUPGHOME=$TMPDIR | ||
gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv-key FCF19B67866562F08A43AAD681F6104CD0F150FC | ||
wget -P $TMPDIR https://github.com/shesek/spark-wallet/releases/download/v${version}/SHA256SUMS.asc | ||
wget -P $TMPDIR https://github.com/shesek/spark-wallet/releases/download/v${version}/spark-wallet-${version}-npm.tgz | ||
(cd $TMPDIR; gpg --verify $TMPDIR/SHA256SUMS.asc; sha256sum -c --ignore-missing $TMPDIR/SHA256SUMS.asc) | ||
shasum=$(sha256sum $TMPDIR/spark-wallet-${version}-npm.tgz | cut -d\ -f1) | ||
|
||
# Make qrcode-terminal a strict dependency so that node2nix includes it in the package derivation. | ||
tar xvf $TMPDIR/spark-wallet-*-npm.tgz -C $TMPDIR | ||
jq '.dependencies["qrcode-terminal"] = .optionalDependencies["qrcode-terminal"]' $TMPDIR/package/package.json | sponge $TMPDIR/package/package.json | ||
|
||
# Run node2nix | ||
cp pkg.json $TMPDIR/pkg.json | ||
node2nix --nodejs-10 -i $TMPDIR/pkg.json -c composition.nix --no-copy-node-env --supplement-input supplement.json | ||
|
||
# Use verified source in node-packages.nix | ||
url="https://github.com/shesek/spark-wallet/releases/download/v$version/spark-wallet-$version-npm.tgz" | ||
sed -i '/packageName = "spark-wallet";/!b;n;n;c\ src = fetchurl {\n url = "'$url'";\n sha256 = "'$shasum'";\n };' node-packages.nix |
Oops, something went wrong.