Skip to content

Commit d4d592e

Browse files
bbjubjub2494aldoborrero
authored andcommitted
nimbus: 24.6.0 -> 24.12.0
1 parent 68b3b58 commit d4d592e

File tree

2 files changed

+21
-54
lines changed

2 files changed

+21
-54
lines changed

pkgs/nimbus/default.nix

Lines changed: 10 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,19 @@
11
{
2+
applyPatches,
23
fetchFromGitHub,
3-
lib,
4-
stdenv,
5-
lsb-release,
6-
which,
7-
cmake,
84
pkgs,
9-
writeShellScriptBin,
10-
buildFlags ? ["nimbus_beacon_node" "nimbus_validator_client"],
5+
targets ? ["nimbus_beacon_node" "nimbus_validator_client"],
116
}: let
12-
nim1 = pkgs.nim-unwrapped-1.overrideAttrs rec {
13-
version = "1.6.18";
14-
src = pkgs.fetchurl {
15-
url = "https://nim-lang.org/download/nim-${version}.tar.xz";
16-
hash = "sha256-UCQaxyIpG6ljdT8EWqo1h7c8GqKK4pxXPBWluKYCoss=";
17-
};
18-
};
19-
in
20-
stdenv.mkDerivation rec {
21-
pname = "nimbus-eth2";
22-
version = "24.6.0";
23-
7+
version = "24.12.0";
8+
src = applyPatches {
249
src = fetchFromGitHub {
2510
owner = "status-im";
26-
repo = pname;
11+
repo = "nimbus-eth2";
2712
rev = "v${version}";
28-
hash = "sha256-cSQfuwMz0JDALJKeYpq25vvqq4SnAKkqW6kRNWGG788=";
13+
hash = "sha256-DBvsnGr91a69eCj1hAeoVOpxas5rfaT36rIxWEmvIVg=";
2914
fetchSubmodules = true;
3015
};
31-
32-
fakeGit = writeShellScriptBin "git" "echo ${version}";
33-
34-
# Dunno why we need `lsb-release`, looks like for nim itself
35-
# without `which` it can't find gcc
36-
nativeBuildInputs = [fakeGit lsb-release nim1 which cmake];
37-
enableParallelBuilding = true;
38-
39-
NIMFLAGS = "-d:disableMarchNative -d:release";
40-
41-
makeFlags = ["USE_SYSTEM_NIM=1"];
42-
inherit buildFlags;
43-
dontConfigure = true;
44-
45-
preBuild = ''
46-
patchShebangs scripts vendor/nimbus-build-system/scripts
47-
make nimbus-build-system-paths
48-
'';
49-
50-
installPhase = ''
51-
mkdir -p $out/bin
52-
rm -f build/generate_makefile
53-
cp build/* $out/bin
54-
'';
55-
56-
meta = {
57-
description = "Nim implementation of the Ethereum Beacon Chain";
58-
homepage = "https://github.com/status-im/nimbus-eth2";
59-
license = lib.licenses.asl20;
60-
mainProgram = "nimbus_beacon_node";
61-
platforms = ["x86_64-linux"];
62-
};
63-
}
16+
patches = [./fix-hash.patch];
17+
};
18+
in
19+
import "${src}/nix" {inherit pkgs targets;}

pkgs/nimbus/fix-hash.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/nix/nimble.nix b/nix/nimble.nix
2+
index 5343aaa81..770f8fa5a 100644
3+
--- a/nix/nimble.nix
4+
+++ b/nix/nimble.nix
5+
@@ -8,5 +8,5 @@ in pkgs.fetchFromGitHub {
6+
repo = "nimble";
7+
rev = tools.findKeyValue "^ +NimbleStableCommit = \"([a-f0-9]+)\".+" sourceFile;
8+
# WARNING: Requires manual updates when Nim compiler version changes.
9+
- hash = "sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w=";
10+
+ hash = "sha256-MVHf19UbOWk8Zba2scj06PxdYYOJA6OXrVyDQ9Ku6Us=";
11+
}

0 commit comments

Comments
 (0)