mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-07 14:00:59 +03:00
matrix-appservice-discord: adapt update script to new nix-prefetch-github
This commit is contained in:
parent
e8808ced29
commit
f38f3e439b
@ -22,7 +22,7 @@ in mkYarnPackage rec {
|
|||||||
owner = "matrix-org";
|
owner = "matrix-org";
|
||||||
repo = "matrix-appservice-discord";
|
repo = "matrix-appservice-discord";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = pin.srcSha256;
|
hash = pin.srcHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
packageJSON = ./package.json;
|
packageJSON = ./package.json;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"srcSha256": "g681w7RD96/xKP+WnIyY4bcVHVQhysgDPZo4TgCRiuY=",
|
"srcHash": "sha256-g681w7RD96/xKP+WnIyY4bcVHVQhysgDPZo4TgCRiuY=",
|
||||||
"yarnSha256": "0cm9yprj0ajmrdpap3p2lx3xrrkar6gghlxnj9127ks6p5c1ji3r"
|
"yarnSha256": "0cm9yprj0ajmrdpap3p2lx3xrrkar6gghlxnj9127ks6p5c1ji3r"
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ if [ -z "$tag" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
src="https://raw.githubusercontent.com/$ORG/$PROJ/$tag"
|
src="https://raw.githubusercontent.com/$ORG/$PROJ/$tag"
|
||||||
src_sha256=$(nix-prefetch-github $ORG $PROJ --rev ${tag} | jq -r .sha256)
|
src_hash=$(nix-prefetch-github $ORG $PROJ --rev ${tag} | jq -r .hash)
|
||||||
|
|
||||||
tmpdir=$(mktemp -d)
|
tmpdir=$(mktemp -d)
|
||||||
trap 'rm -rf "$tmpdir"' EXIT
|
trap 'rm -rf "$tmpdir"' EXIT
|
||||||
@ -36,7 +36,7 @@ curl -O "$src/package.json"
|
|||||||
cat > pin.json << EOF
|
cat > pin.json << EOF
|
||||||
{
|
{
|
||||||
"version": "$(echo $tag | grep -P '(\d|\.)+' -o)",
|
"version": "$(echo $tag | grep -P '(\d|\.)+' -o)",
|
||||||
"srcSha256": "$src_sha256",
|
"srcSha256": "$src_hash",
|
||||||
"yarnSha256": "$yarn_sha256"
|
"yarnSha256": "$yarn_sha256"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user