|
2 | 2 | fetchFromGitHub,
|
3 | 3 | lib,
|
4 | 4 | stdenv,
|
5 |
| - nim, |
6 | 5 | lsb-release,
|
7 | 6 | which,
|
8 | 7 | cmake,
|
| 8 | + pkgs, |
9 | 9 | writeShellScriptBin,
|
10 | 10 | buildFlags ? ["nimbus_beacon_node"],
|
11 |
| -}: |
12 |
| -stdenv.mkDerivation rec { |
13 |
| - pname = "nimbus-eth2"; |
14 |
| - version = "23.10.1"; |
15 |
| - |
16 |
| - src = fetchFromGitHub { |
17 |
| - owner = "status-im"; |
18 |
| - repo = pname; |
19 |
| - rev = "v${version}"; |
20 |
| - hash = "sha256-+/AmkgXblg5Gf7VNbVz2uqAs+o2Bol9IIZS3i3t7r94="; |
21 |
| - fetchSubmodules = true; |
| 11 | +}: let |
| 12 | + nim1 = pkgs.nim-unwrapped-1.overrideAttrs rec { |
| 13 | + version = "1.6.16"; |
| 14 | + src = pkgs.fetchurl { |
| 15 | + url = "https://nim-lang.org/download/nim-${version}.tar.xz"; |
| 16 | + hash = "sha256-ZnST+QKfdf3G5jsMdQ59JP9afBKkGWVykE1F1y1OViA="; |
| 17 | + }; |
22 | 18 | };
|
23 |
| - |
24 |
| - fakeGit = writeShellScriptBin "git" "echo ${version}"; |
25 |
| - |
26 |
| - # Dunno why we need `lsb-release`, looks like for nim itself |
27 |
| - # without `which` it can't find gcc |
28 |
| - nativeBuildInputs = [fakeGit lsb-release nim which cmake]; |
29 |
| - enableParallelBuilding = true; |
30 |
| - |
31 |
| - NIMFLAGS = "-d:disableMarchNative -d:release"; |
32 |
| - |
33 |
| - makeFlags = ["USE_SYSTEM_NIM=1"]; |
34 |
| - inherit buildFlags; |
35 |
| - dontConfigure = true; |
36 |
| - |
37 |
| - preBuild = '' |
38 |
| - patchShebangs scripts vendor/nimbus-build-system/scripts |
39 |
| - make nimbus-build-system-paths |
40 |
| - ''; |
41 |
| - |
42 |
| - installPhase = '' |
43 |
| - mkdir -p $out/bin |
44 |
| - rm -f build/generate_makefile |
45 |
| - cp build/* $out/bin |
46 |
| - ''; |
47 |
| - |
48 |
| - meta = { |
49 |
| - description = "Nim implementation of the Ethereum Beacon Chain"; |
50 |
| - homepage = "https://github.com/status-im/nimbus-eth2"; |
51 |
| - license = lib.licenses.asl20; |
52 |
| - mainProgram = "nimbus_beacon_node"; |
53 |
| - platforms = ["x86_64-linux"]; |
54 |
| - }; |
55 |
| -} |
| 19 | +in |
| 20 | + stdenv.mkDerivation rec { |
| 21 | + pname = "nimbus-eth2"; |
| 22 | + version = "23.11.0"; |
| 23 | + |
| 24 | + src = fetchFromGitHub { |
| 25 | + owner = "status-im"; |
| 26 | + repo = pname; |
| 27 | + rev = "v${version}"; |
| 28 | + hash = "sha256-SMiWLhsuERR2GOTSbOnmH2LBzTbgyKEXRnIuFKAuXDE="; |
| 29 | + fetchSubmodules = true; |
| 30 | + }; |
| 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 | + } |
0 commit comments