From 2b631da34e7ae60e7cca90d91e8ac835ffd573c2 Mon Sep 17 00:00:00 2001 From: Galin Stefanov Date: Tue, 4 Feb 2025 13:56:32 +0200 Subject: [PATCH] feat(nimbus): Upgrade 24.12.0 -> 25.1.0 Remove the `nimble.nix` patch as on version 25.1.0 there is no need to patch `nimble.nix` as it contains the correct hash. I verified it like this: ``` nurl -S https://github.com/nim-lang/nimble 123f97a5e4ee9ba35720c0869e19a047c43c797e $ nix flake prefetch --extra-experimental-features 'nix-command flakes' --json git+https://github.com/nim-lang/nimble?allRefs=1&rev=123f97a5e4ee9ba35720c0869e19a047c43c797e&submodules=1 fetchFromGitHub { owner = "nim-lang"; repo = "nimble"; rev = "123f97a5e4ee9ba35720c0869e19a047c43c797e"; hash = "sha256-Rz48sGUKZEAp+UySla+MlsOfsERekuGKw69Tm11fDz8="; fetchSubmodules = true; } ``` The hash `sha256-Rz48sGUKZEAp+UySla+MlsOfsERekuGKw69Tm11fDz8=` is exactly the same as the one in nimble.nix @ 25.1.0: https://github.com/status-im/nimbus-eth2/blob/v25.1.0/nix/nimble.nix#L12 --- pkgs/nimbus/default.nix | 18 +++++++----------- pkgs/nimbus/fix-hash.patch | 11 ----------- 2 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 pkgs/nimbus/fix-hash.patch diff --git a/pkgs/nimbus/default.nix b/pkgs/nimbus/default.nix index 782c09a4..1438513a 100644 --- a/pkgs/nimbus/default.nix +++ b/pkgs/nimbus/default.nix @@ -1,20 +1,16 @@ { - applyPatches, fetchFromGitHub, pkgs, targets ? ["nimbus_beacon_node" "nimbus_validator_client" "gnosis-build" "gnosis-vc-build"], stableSystems ? ["x86_64-linux" "aarch64-linux"], }: let - version = "24.12.0"; - src = applyPatches { - src = fetchFromGitHub { - owner = "status-im"; - repo = "nimbus-eth2"; - rev = "v${version}"; - hash = "sha256-DBvsnGr91a69eCj1hAeoVOpxas5rfaT36rIxWEmvIVg="; - fetchSubmodules = true; - }; - patches = [./fix-hash.patch]; + version = "25.1.0"; + src = fetchFromGitHub { + owner = "status-im"; + repo = "nimbus-eth2"; + rev = "v${version}"; + hash = "sha256-I+rDkVUk5BLxV2wNnRMHSE9Uuz9KykbVeXB40zvRZz8="; + fetchSubmodules = true; }; in import "${src}/nix" {inherit pkgs targets stableSystems;} diff --git a/pkgs/nimbus/fix-hash.patch b/pkgs/nimbus/fix-hash.patch deleted file mode 100644 index 067449c3..00000000 --- a/pkgs/nimbus/fix-hash.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/nix/nimble.nix b/nix/nimble.nix -index 5343aaa81..770f8fa5a 100644 ---- a/nix/nimble.nix -+++ b/nix/nimble.nix -@@ -8,5 +8,5 @@ in pkgs.fetchFromGitHub { - repo = "nimble"; - rev = tools.findKeyValue "^ +NimbleStableCommit = \"([a-f0-9]+)\".+" sourceFile; - # WARNING: Requires manual updates when Nim compiler version changes. -- hash = "sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w="; -+ hash = "sha256-MVHf19UbOWk8Zba2scj06PxdYYOJA6OXrVyDQ9Ku6Us="; - }