diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19bbff1ee..bb3025379 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,21 +35,16 @@ jobs: cpu: amd64 - os: windows cpu: amd64 - branch: [~, upstream/version-1-6, v2.0.6] + branch: [~, upstream/version-2-0] exclude: - target: os: macos - branch: upstream/version-1-6 + branch: upstream/version-2-0 - target: os: windows - branch: upstream/version-1-6 - - target: - os: windows - branch: ~ + branch: upstream/version-2-0 include: - - branch: upstream/version-1-6 - branch-short: version-1-6 - - branch: v2.0.6 + - branch: upstream/version-2-0 branch-short: version-2-0 nimflags-extra: --mm:refc - target: diff --git a/nix/checksums.nix b/nix/checksums.nix new file mode 100644 index 000000000..c3b322e3a --- /dev/null +++ b/nix/checksums.nix @@ -0,0 +1,12 @@ +{ pkgs ? import { } }: + +let + tools = pkgs.callPackage ./tools.nix {}; + sourceFile = ../vendor/nimbus-build-system/vendor/Nim/koch.nim; +in pkgs.fetchFromGitHub { + owner = "nim-lang"; + repo = "checksums"; + rev = tools.findKeyValue "^ +ChecksumsStableCommit = \"([a-f0-9]+)\"$" sourceFile; + # WARNING: Requires manual updates when Nim compiler version changes. + hash = "sha256-AIiMBqLcGJCTkINHfJ2dN3ogitU7Za9Z9Sv9zjKeOQk="; +} diff --git a/nix/csources.nix b/nix/csources.nix index ed217e5cf..33cd9d0fc 100644 --- a/nix/csources.nix +++ b/nix/csources.nix @@ -5,8 +5,8 @@ let sourceFile = ../vendor/nimbus-build-system/vendor/Nim/config/build_config.txt; in pkgs.fetchFromGitHub { owner = "nim-lang"; - repo = "csources_v1"; + repo = "csources_v2"; rev = tools.findKeyValue "^nim_csourcesHash=([a-f0-9]+)$" sourceFile; # WARNING: Requires manual updates when Nim compiler version changes. - hash = "sha256-gwBFuR7lzO4zttR/6rgdjXMRxVhwKeLqDwpmOwMyU7A="; + hash = "sha256-UCLtoxOcGYjBdvHx7A47x6FjLMi6VZqpSs65MN7fpBs="; } diff --git a/nix/default.nix b/nix/default.nix index a86470974..a444329eb 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -19,9 +19,7 @@ let inherit (pkgs) stdenv lib writeScriptBin callPackage; - nimble = callPackage ./nimble.nix {}; - csources = callPackage ./csources.nix {}; - revision = lib.substring 0 8 (src.rev or "dirty"); + revision = lib.substring 0 8 (src.rev or "unknown"); in stdenv.mkDerivation rec { pname = "nimbus-eth2"; version = "${callPackage ./version.nix {}}-${revision}"; @@ -60,9 +58,10 @@ in stdenv.mkDerivation rec { preBuild = '' pushd vendor/nimbus-build-system/vendor/Nim mkdir dist - cp -r ${nimble} dist/nimble - cp -r ${csources} csources_v1 - chmod 777 -R dist/nimble csources_v1 + cp -r ${callPackage ./nimble.nix {}} dist/nimble + cp -r ${callPackage ./checksums.nix {}} dist/checksums + cp -r ${callPackage ./csources.nix {}} csources_v2 + chmod 777 -R dist/nimble csources_v2 sed -i 's/isGitRepo(destDir)/false/' tools/deps.nim popd ''; diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 8cdaec502..09a356878 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 8cdaec502b5a48f2514e11209f0d81a001d2a2b1 +Subproject commit 09a35687897041c152986f13473466fa55f987ca