mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
element-desktop, element-web: adapt update script to new nix-prefetch-github
This commit is contained in:
parent
aab2097d2d
commit
ece93eb8af
@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
|
||||
owner = "vector-im";
|
||||
repo = "element-desktop";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = desktopSrcHash;
|
||||
hash = desktopSrcHash;
|
||||
};
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
|
||||
owner = "vector-im";
|
||||
repo = finalAttrs.pname;
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = webSrcHash;
|
||||
hash = webSrcHash;
|
||||
};
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
|
@ -12,7 +12,7 @@ in stdenv.mkDerivation rec {
|
||||
owner = "atom";
|
||||
repo = "node-keytar";
|
||||
rev = "v${version}";
|
||||
sha256 = pinData.srcHash;
|
||||
hash = pinData.srcHash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "7.9.0",
|
||||
"srcHash": "Mnl0Im2hZJXJEtyXb5rgMntekkUAnOG2MN1bwfgh0eg=",
|
||||
"srcHash": "sha256-Mnl0Im2hZJXJEtyXb5rgMntekkUAnOG2MN1bwfgh0eg=",
|
||||
"npmHash": "sha256-ldfRWV+HXBdBYO2ZiGbVFSHV4/bMG43U7w+sJ4kpVUY="
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-npm-deps
|
||||
#!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-npm-deps nix-prefetch-github
|
||||
|
||||
if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
|
||||
echo "Regenerates packaging data for the keytar package."
|
||||
@ -25,7 +25,7 @@ wget "$SRC/package.json"
|
||||
npm_hash=$(prefetch-npm-deps package-lock.json)
|
||||
rm -rf node_modules package.json package-lock.json
|
||||
|
||||
src_hash=$(nix-prefetch-github atom node-keytar --rev v${version} | jq -r .sha256)
|
||||
src_hash=$(nix-prefetch-github atom node-keytar --rev v${version} | jq -r .hash)
|
||||
|
||||
cat > pin.json << EOF
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"version" = "1.11.36";
|
||||
"hashes" = {
|
||||
"desktopSrcHash" = "MMTuyyUXur5Fy24aXPWtZbQLAaXR2R7coEi8ZOJo1YI=";
|
||||
"desktopSrcHash" = "sha256-MMTuyyUXur5Fy24aXPWtZbQLAaXR2R7coEi8ZOJo1YI=";
|
||||
"desktopYarnHash" = "03wmdqnxzjrvdypwrb5z564liiqamwn6qmw2fww1mja8dkdkx5ng";
|
||||
"webSrcHash" = "u+Y/iLRlTd5RkczF6qIaer9HKFnm8LUGP8ZnB/WfiGI=";
|
||||
"webSrcHash" = "sha256-u+Y/iLRlTd5RkczF6qIaer9HKFnm8LUGP8ZnB/WfiGI=";
|
||||
"webYarnHash" = "0s9ly1hr9jvb2asgjf6g5n5n5w6qh51wkwyl7ps891c0hv9m28zm";
|
||||
};
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ let
|
||||
|
||||
in rustPlatform.buildRustPackage rec {
|
||||
pname = "seshat-node";
|
||||
inherit (pinData) version;
|
||||
inherit (pinData) version cargoHash;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matrix-org";
|
||||
repo = "seshat";
|
||||
rev = version;
|
||||
sha256 = pinData.srcHash;
|
||||
hash = pinData.srcHash;
|
||||
};
|
||||
|
||||
sourceRoot = "source/seshat-node/native";
|
||||
@ -53,6 +53,4 @@ in rustPlatform.buildRustPackage rec {
|
||||
'';
|
||||
|
||||
disallowedReferences = [ stdenv.cc.cc ];
|
||||
|
||||
cargoSha256 = pinData.cargoHash;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "2.3.3",
|
||||
"srcHash": "HmKHWFoO8TQ9S/RcJnJ3h85/2uSkqGrgLnX82hkux4Q=",
|
||||
"srcHash": "sha256-HmKHWFoO8TQ9S/RcJnJ3h85/2uSkqGrgLnX82hkux4Q=",
|
||||
"yarnHash": "1cbkv8ap7f8vxl5brzqb86d2dyxg555sz67cldrp0vgnk8sq6ibp",
|
||||
"cargoHash": "sha256-WsgTbQ91aZZV5sIuFVjsccdiXivjtAUC1Zs/4uNk1zU="
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-yarn-deps yarn nix-prefetch
|
||||
#!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-yarn-deps yarn nix-prefetch nix-prefetch-github
|
||||
|
||||
if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
|
||||
echo "Regenerates packaging data for the seshat package."
|
||||
@ -25,7 +25,7 @@ wget "$SRC/seshat-node/yarn.lock"
|
||||
yarn_hash=$(prefetch-yarn-deps yarn.lock)
|
||||
popd
|
||||
|
||||
src_hash=$(nix-prefetch-github matrix-org seshat --rev ${version} | jq -r .sha256)
|
||||
src_hash=$(nix-prefetch-github matrix-org seshat --rev ${version} | jq -r .hash)
|
||||
|
||||
cat > pin.json << EOF
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ version="${version#v}"
|
||||
|
||||
# Element Web
|
||||
web_src="https://raw.githubusercontent.com/vector-im/element-web/v$version"
|
||||
web_src_hash=$(nix-prefetch-github vector-im element-web --rev v${version} | jq -r .sha256)
|
||||
web_src_hash=$(nix-prefetch-github vector-im element-web --rev v${version} | jq -r .hash)
|
||||
|
||||
web_tmpdir=$(mktemp -d)
|
||||
trap 'rm -rf "$web_tmpdir"' EXIT
|
||||
@ -32,7 +32,7 @@ popd
|
||||
|
||||
# Element Desktop
|
||||
desktop_src="https://raw.githubusercontent.com/vector-im/element-desktop/v$version"
|
||||
desktop_src_hash=$(nix-prefetch-github vector-im element-desktop --rev v${version} | jq -r .sha256)
|
||||
desktop_src_hash=$(nix-prefetch-github vector-im element-desktop --rev v${version} | jq -r .hash)
|
||||
|
||||
desktop_tmpdir=$(mktemp -d)
|
||||
trap 'rm -rf "$desktop_tmpdir"' EXIT
|
||||
|
Loading…
Reference in New Issue
Block a user