electrs: fix package update script

Using `update-source-version` requires a separate attrset for cargo deps.
Also convert pkg to `finalAttrs` format.

+10 -6
+7 -5
pkgs/by-name/el/electrs/package.nix
··· 8 let 9 rocksdb = rocksdb_7_10; 10 in 11 - rustPlatform.buildRustPackage rec { 12 pname = "electrs"; 13 version = "0.10.9"; 14 15 src = fetchFromGitHub { 16 owner = "romanz"; 17 repo = "electrs"; 18 - rev = "v${version}"; 19 hash = "sha256-Xo7aqP4tIh/kYthPucscxnl+ZtVioEja4TTFdH0Q350="; 20 }; 21 22 - useFetchCargoVendor = true; 23 - cargoHash = "sha256-wDEtVsgkddGv89tTy96wYzNWVicn34Gxi+YAo7yAfQA="; 24 25 # needed for librocksdb-sys 26 nativeBuildInputs = [ rustPlatform.bindgenHook ]; ··· 38 maintainers = with maintainers; [ prusnak ]; 39 mainProgram = "electrs"; 40 }; 41 - }
··· 8 let 9 rocksdb = rocksdb_7_10; 10 in 11 + rustPlatform.buildRustPackage (finalAttrs: { 12 pname = "electrs"; 13 version = "0.10.9"; 14 15 src = fetchFromGitHub { 16 owner = "romanz"; 17 repo = "electrs"; 18 + rev = "v${finalAttrs.version}"; 19 hash = "sha256-Xo7aqP4tIh/kYthPucscxnl+ZtVioEja4TTFdH0Q350="; 20 }; 21 22 + cargoDeps = rustPlatform.fetchCargoVendor { 23 + inherit (finalAttrs) pname version src; 24 + hash = "sha256-wDEtVsgkddGv89tTy96wYzNWVicn34Gxi+YAo7yAfQA="; 25 + }; 26 27 # needed for librocksdb-sys 28 nativeBuildInputs = [ rustPlatform.bindgenHook ]; ··· 40 maintainers = with maintainers; [ prusnak ]; 41 mainProgram = "electrs"; 42 }; 43 + })
+3 -1
pkgs/by-name/el/electrs/update.sh
··· 2 #!nix-shell -i bash -p coreutils curl jq git gnupg common-updater-scripts 3 set -euo pipefail 4 5 # Fetch latest release, GPG-verify the tag, update derivation 6 7 scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd) ··· 34 rm -rf $repo/.git 35 hash=$(nix --extra-experimental-features nix-command hash path $repo) 36 37 - (cd "$nixpkgs" && update-source-version electrs "$version" "$hash" && update-source-version electrs --ignore-same-version --source-key=cargoDeps) 38 echo 39 echo "electrs: $oldVersion -> $version"
··· 2 #!nix-shell -i bash -p coreutils curl jq git gnupg common-updater-scripts 3 set -euo pipefail 4 5 + trap 'echo "Error at ${BASH_SOURCE[0]}:$LINENO"' ERR 6 + 7 # Fetch latest release, GPG-verify the tag, update derivation 8 9 scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd) ··· 36 rm -rf $repo/.git 37 hash=$(nix --extra-experimental-features nix-command hash path $repo) 38 39 + (cd "$nixpkgs" && update-source-version electrs "$version" "$hash" && update-source-version electrs --ignore-same-version --source-key=cargoDeps.vendorStaging) 40 echo 41 echo "electrs: $oldVersion -> $version"