diff options
author | Theodore Ni <3806110+tjni@users.noreply.github.com> | 2023-07-07 23:02:22 -0700 |
---|---|---|
committer | Theodore Ni <3806110+tjni@users.noreply.github.com> | 2023-07-18 18:16:13 -0700 |
commit | ece93eb8af620092b7a5d4997528a3c1eedf9f72 (patch) | |
tree | 9a4fc63f2fb4543f2d0e8cd9dc20e9e9978213b8 /pkgs/applications/networking/instant-messengers/element | |
parent | aab2097d2d6c3440debb3fa06ae6b7e6643c782f (diff) |
element-desktop, element-web: adapt update script to new nix-prefetch-github
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/element')
10 files changed, 15 insertions, 17 deletions
diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix index 67e21bcd1821..3f2d5a99fe67 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix +++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix @@ -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 { diff --git a/pkgs/applications/networking/instant-messengers/element/element-web.nix b/pkgs/applications/networking/instant-messengers/element/element-web.nix index e6b73d2983a6..4e80744a4c0f 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-web.nix +++ b/pkgs/applications/networking/instant-messengers/element/element-web.nix @@ -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 { diff --git a/pkgs/applications/networking/instant-messengers/element/keytar/default.nix b/pkgs/applications/networking/instant-messengers/element/keytar/default.nix index 6e462ef24dbe..84196371be3a 100644 --- a/pkgs/applications/networking/instant-messengers/element/keytar/default.nix +++ b/pkgs/applications/networking/instant-messengers/element/keytar/default.nix @@ -12,7 +12,7 @@ in stdenv.mkDerivation rec { owner = "atom"; repo = "node-keytar"; rev = "v${version}"; - sha256 = pinData.srcHash; + hash = pinData.srcHash; }; nativeBuildInputs = [ diff --git a/pkgs/applications/networking/instant-messengers/element/keytar/pin.json b/pkgs/applications/networking/instant-messengers/element/keytar/pin.json index dc7420ab4543..626f5a62ea1d 100644 --- a/pkgs/applications/networking/instant-messengers/element/keytar/pin.json +++ b/pkgs/applications/networking/instant-messengers/element/keytar/pin.json @@ -1,5 +1,5 @@ { "version": "7.9.0", - "srcHash": "Mnl0Im2hZJXJEtyXb5rgMntekkUAnOG2MN1bwfgh0eg=", + "srcHash": "sha256-Mnl0Im2hZJXJEtyXb5rgMntekkUAnOG2MN1bwfgh0eg=", "npmHash": "sha256-ldfRWV+HXBdBYO2ZiGbVFSHV4/bMG43U7w+sJ4kpVUY=" } diff --git a/pkgs/applications/networking/instant-messengers/element/keytar/update.sh b/pkgs/applications/networking/instant-messengers/element/keytar/update.sh index 0ddfa0247263..9b8d014f03c9 100755 --- a/pkgs/applications/networking/instant-messengers/element/keytar/update.sh +++ b/pkgs/applications/networking/instant-messengers/element/keytar/update.sh @@ -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 { diff --git a/pkgs/applications/networking/instant-messengers/element/pin.nix b/pkgs/applications/networking/instant-messengers/element/pin.nix index 6f3cfa832567..d32b72557181 100644 --- a/pkgs/applications/networking/instant-messengers/element/pin.nix +++ b/pkgs/applications/networking/instant-messengers/element/pin.nix @@ -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"; }; } diff --git a/pkgs/applications/networking/instant-messengers/element/seshat/default.nix b/pkgs/applications/networking/instant-messengers/element/seshat/default.nix index 915e3faa3e40..5d7535c5289b 100644 --- a/pkgs/applications/networking/instant-messengers/element/seshat/default.nix +++ b/pkgs/applications/networking/instant-messengers/element/seshat/default.nix @@ -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; } diff --git a/pkgs/applications/networking/instant-messengers/element/seshat/pin.json b/pkgs/applications/networking/instant-messengers/element/seshat/pin.json index 78d5156f54a4..f0648d11f2e0 100644 --- a/pkgs/applications/networking/instant-messengers/element/seshat/pin.json +++ b/pkgs/applications/networking/instant-messengers/element/seshat/pin.json @@ -1,6 +1,6 @@ { "version": "2.3.3", - "srcHash": "HmKHWFoO8TQ9S/RcJnJ3h85/2uSkqGrgLnX82hkux4Q=", + "srcHash": "sha256-HmKHWFoO8TQ9S/RcJnJ3h85/2uSkqGrgLnX82hkux4Q=", "yarnHash": "1cbkv8ap7f8vxl5brzqb86d2dyxg555sz67cldrp0vgnk8sq6ibp", "cargoHash": "sha256-WsgTbQ91aZZV5sIuFVjsccdiXivjtAUC1Zs/4uNk1zU=" } diff --git a/pkgs/applications/networking/instant-messengers/element/seshat/update.sh b/pkgs/applications/networking/instant-messengers/element/seshat/update.sh index 1315715ac049..6e7e75e66bce 100755 --- a/pkgs/applications/networking/instant-messengers/element/seshat/update.sh +++ b/pkgs/applications/networking/instant-messengers/element/seshat/update.sh @@ -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 { diff --git a/pkgs/applications/networking/instant-messengers/element/update.sh b/pkgs/applications/networking/instant-messengers/element/update.sh index ca9f39c306db..c68a347e68ae 100755 --- a/pkgs/applications/networking/instant-messengers/element/update.sh +++ b/pkgs/applications/networking/instant-messengers/element/update.sh @@ -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 |