From 72d52aabbb156947c0fffc4753ca6619d2f1ca62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 23 Sep 2025 23:07:01 -0300 Subject: [PATCH 1/7] flake: update inputs, fix build with GHC 9.8 --- flake.lock | 179 ++++++++++++----------------------------------------- flake.nix | 45 +++++++++----- 2 files changed, 66 insertions(+), 158 deletions(-) diff --git a/flake.lock b/flake.lock index 5dde3b59b..b6cba7f8c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,8 +2,12 @@ "nodes": { "empty-smt-solver": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1751304960, @@ -42,62 +46,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -109,11 +62,11 @@ "forge-std": { "flake": false, "locked": { - "lastModified": 1749634666, - "narHash": "sha256-5HqpP/aicV71AXF+MYCg3mxHFnG8Wn1Ov3W6C35uNFk=", + "lastModified": 1758198291, + "narHash": "sha256-kPF5n6T0ho1sJ7ZS21/RpoaG/lc/9LvE2mLQfXwwyWQ=", "owner": "foundry-rs", "repo": "forge-std", - "rev": "60acb7aaadcce2d68e52986a0a66fe79f07d138f", + "rev": "0768d9c08c085c79bb31d88683a78770764fec49", "type": "github" }, "original": { @@ -124,15 +77,19 @@ }, "foundry": { "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_2" + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1752867797, - "narHash": "sha256-oT129SDSr7SI9ThTd6ZbpmShh5f2tzUH3S4hl6c5/7w=", + "lastModified": 1758100230, + "narHash": "sha256-sARl8NpG4ifzhd7j5D04A5keJIf0zkP1XYIuDEkzXb4=", "owner": "shazow", "repo": "foundry.nix", - "rev": "d4445852933ab5bc61ca532cb6c5d3276d89c478", + "rev": "e632b06dc759e381ef04f15ff9541f889eda6013", "type": "github" }, "original": { @@ -144,48 +101,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751180975, - "narHash": "sha256-BKk4yDiXr4LdF80OTVqYJ53Q74rOcA/82EClXug8xsY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a48741b083d4f36dd79abd9f760c84da6b4dc0e5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1751180975, - "narHash": "sha256-BKk4yDiXr4LdF80OTVqYJ53Q74rOcA/82EClXug8xsY=", - "owner": "NixOS", + "lastModified": 1758670613, + "narHash": "sha256-0WhfYUF4lBYpOTPHMqJlkGv8Hd0YIxSkmAPAMYtG91k=", + "owner": "elopez", "repo": "nixpkgs", - "rev": "a48741b083d4f36dd79abd9f760c84da6b4dc0e5", + "rev": "2a7b8c3b5d55f936f5cb91b7ce72a14ccf67326e", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1755175540, - "narHash": "sha256-V0j2S1r25QnbqBLzN2Rg/dKKil789bI3P3id7bDPVc4=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a595dde4d0d31606e19dcec73db02279db59d201", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", + "owner": "elopez", + "ref": "libff-cmake", "repo": "nixpkgs", "type": "github" } @@ -194,10 +119,10 @@ "inputs": { "empty-smt-solver": "empty-smt-solver", "ethereum-tests": "ethereum-tests", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "forge-std": "forge-std", "foundry": "foundry", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs", "solc-pkgs": "solc-pkgs", "solidity": "solidity" } @@ -205,29 +130,31 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-Prwz95BgMHcWd72VwVbcH17LsV9f24K2QMcUiWUQZzI=", + "narHash": "sha256-AvITkfpNYgCypXuLJyqco0li+unVw39BAfdOZvd/SPE=", "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/26fc3fd/macosx-amd64/list.json" } }, "solc-pkgs": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": [ + "flake-utils" + ], "nixpkgs": [ "nixpkgs" ], "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1724145339, - "narHash": "sha256-z8pLkpdsAA0At1ofQd6KNmrxpBuUT9OKTlCDqJDW1GI=", + "lastModified": 1756368702, + "narHash": "sha256-cqEHv7uCV0LibmQphyiXZ1+jYtGjMNb9Pae4tfcAcF8=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "9630767051bfefd552c6858c5df141368338b077", + "rev": "d83e90df2fa8359a690f6baabf76099432193c3f", "type": "github" }, "original": { @@ -267,36 +194,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 1ec072e8d..a3b2ab75b 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,12 @@ inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - foundry.url = "github:shazow/foundry.nix/stable"; + nixpkgs.url = "github:elopez/nixpkgs/libff-cmake"; # return to nixpkgs when https://github.com/NixOS/nixpkgs/pull/445662 lands + foundry = { + url = "github:shazow/foundry.nix/stable"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; solidity = { url = "github:argotorg/solidity/8a97fa7a1db1ec509221ead6fea6802c684ee887"; flake = false; @@ -19,11 +23,13 @@ }; empty-smt-solver = { url = "github:msooseth/empty-smt-solver/74bd120fdb730fde8e44243305e669e5e8a3e02a"; - flake = true; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; }; solc-pkgs = { url = "github:hellwolf/solc.nix"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; }; }; @@ -32,13 +38,28 @@ let pkgs = (import nixpkgs { inherit system; - overlays = [solc-pkgs.overlay]; - config = { allowBroken = true; }; + overlays = [ + foundry.overlay + solc-pkgs.overlay + # btor2tools overlay with newer commit + # remove when https://github.com/NixOS/nixpkgs/pull/445678 lands + (final: prev: { + btor2tools = prev.btor2tools.overrideAttrs (old: { + version = "0-unstable-2024-09-18"; + src = prev.fetchFromGitHub { + owner = "boolector"; + repo = "btor2tools"; + rev = "d33c73ff1d173f1bfac8ba6b1c6d68ba62c55f8e"; + sha256 = "sha256-RVjZ5HM2yQ3eAICFuzwvNeQDXzWzzSiCCslIWMJi6U8="; + }; + }); + }) + ]; }); solc = (solc-pkgs.mkDefault pkgs pkgs.solc_0_8_26); testDeps = [ solc - foundry.defaultPackage.${system} + pkgs.foundry-bin pkgs.go-ethereum pkgs.z3 pkgs.cvc5 @@ -50,17 +71,7 @@ configureFlags = attrs.configureFlags ++ [ "--enable-static" ]; })); - hspkgs = ps : - ps.haskellPackages.override { - overrides = hfinal: hprev: { - with-utf8 = - if (with ps.stdenv; hostPlatform.isDarwin && hostPlatform.isx86) - then ps.haskell.lib.compose.overrideCabal (_ : { extraLibraries = [ps.libiconv]; }) hprev.with-utf8 - else hprev.with-utf8; - # TODO: temporary fix for static build which is still on 9.4 - witch = ps.haskell.lib.doJailbreak hprev.witch; - }; - }; + hspkgs = ps: ps.haskellPackages; hlib = pkgs.haskell.lib; # base hevm derivation. From 597f7ce7cf2ceda60b1c5f3137607c4338f12ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 23 Sep 2025 23:12:54 -0300 Subject: [PATCH 2/7] ci: check-dependencies: fix lockfile query --- .github/workflows/check-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml index cc9e6c551..f559bf5c5 100644 --- a/.github/workflows/check-dependencies.yml +++ b/.github/workflows/check-dependencies.yml @@ -20,7 +20,7 @@ jobs: - name: lookup nix versions id: nixpkgs run: | - NIXPKGS_REV="$(jq -r '.nodes.nixpkgs_2.locked.rev' < flake.lock)" + NIXPKGS_REV="$(jq -r '.nodes.nixpkgs.locked.rev' < flake.lock)" VERSIONS="$(nix eval -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXPKGS_REV.tar.gz" --impure --json \ --expr 'let pkgs = (import {}); in { "secp256k1" = pkgs.secp256k1.version; "ff" = pkgs.libff.version; }')" LIBFF_REV="$(jq .ff -r <<<"$VERSIONS")" From 95911f436ca5fe1245192ea2e88e8fd1d0ee87d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 23 Sep 2025 23:28:50 -0300 Subject: [PATCH 3/7] ci: windows: update GHC to 9.10.3 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae636f86c..0628e29ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -131,7 +131,7 @@ jobs: - uses: haskell-actions/setup@v2.7.7 id: setup with: - ghc-version: '9.8.4' + ghc-version: '9.10.3' - name: Extract GHC & Cabal paths run: | From 3001788f25ef614023f6215f2c6b138be40563d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 29 Sep 2025 11:10:08 -0300 Subject: [PATCH 4/7] flake: return to nixpkgs/staging --- flake.lock | 12 ++++++------ flake.nix | 15 +-------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index b6cba7f8c..1bfcae209 100644 --- a/flake.lock +++ b/flake.lock @@ -101,16 +101,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1758670613, - "narHash": "sha256-0WhfYUF4lBYpOTPHMqJlkGv8Hd0YIxSkmAPAMYtG91k=", - "owner": "elopez", + "lastModified": 1759150607, + "narHash": "sha256-VgHpORcVmVVX9dylL2JXwf5f5UKjKRh36YvmbSI7xLA=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "2a7b8c3b5d55f936f5cb91b7ce72a14ccf67326e", + "rev": "bfe546dade925ad62359dab0fda33a797b49e25d", "type": "github" }, "original": { - "owner": "elopez", - "ref": "libff-cmake", + "owner": "nixos", + "ref": "staging", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index a3b2ab75b..025cd7e92 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:elopez/nixpkgs/libff-cmake"; # return to nixpkgs when https://github.com/NixOS/nixpkgs/pull/445662 lands + nixpkgs.url = "github:nixos/nixpkgs/staging"; foundry = { url = "github:shazow/foundry.nix/stable"; inputs.nixpkgs.follows = "nixpkgs"; @@ -41,19 +41,6 @@ overlays = [ foundry.overlay solc-pkgs.overlay - # btor2tools overlay with newer commit - # remove when https://github.com/NixOS/nixpkgs/pull/445678 lands - (final: prev: { - btor2tools = prev.btor2tools.overrideAttrs (old: { - version = "0-unstable-2024-09-18"; - src = prev.fetchFromGitHub { - owner = "boolector"; - repo = "btor2tools"; - rev = "d33c73ff1d173f1bfac8ba6b1c6d68ba62c55f8e"; - sha256 = "sha256-RVjZ5HM2yQ3eAICFuzwvNeQDXzWzzSiCCslIWMJi6U8="; - }; - }); - }) ]; }); solc = (solc-pkgs.mkDefault pkgs pkgs.solc_0_8_26); From 375e228cbf9dac8002719475a2dd26ba4ab874e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 17 Oct 2025 10:30:46 -0300 Subject: [PATCH 5/7] flake: return to nixpkgs-unstable --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 1bfcae209..d8f5fbe38 100644 --- a/flake.lock +++ b/flake.lock @@ -101,16 +101,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759150607, - "narHash": "sha256-VgHpORcVmVVX9dylL2JXwf5f5UKjKRh36YvmbSI7xLA=", + "lastModified": 1760596604, + "narHash": "sha256-J/i5K6AAz/y5dBePHQOuzC7MbhyTOKsd/GLezSbEFiM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bfe546dade925ad62359dab0fda33a797b49e25d", + "rev": "3cbe716e2346710d6e1f7c559363d14e11c32a43", "type": "github" }, "original": { "owner": "nixos", - "ref": "staging", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 025cd7e92..e17a4d281 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:nixos/nixpkgs/staging"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; foundry = { url = "github:shazow/foundry.nix/stable"; inputs.nixpkgs.follows = "nixpkgs"; From 8a966e89c972bd226c38b3bc00d8c0ec518a61d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 23 Feb 2026 14:57:10 -0300 Subject: [PATCH 6/7] cabal: allow newer base for aeson-optics --- cabal.project | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cabal.project b/cabal.project index 29dd2bdeb..ea564faec 100644 --- a/cabal.project +++ b/cabal.project @@ -3,3 +3,7 @@ packages: . -- work around windows build failure -- https://github.com/kazu-yamamoto/crypton-certificate/issues/27 constraints: crypton-x509-store <1.6.13 || >1.6.13 + +-- allow newer base on aeson-optics +-- https://github.com/phadej/aeson-optics/issues/20 +allow-newer: aeson-optics:base From 6a17253ebdf72857d1b5e0c836516b8eeaffbbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Wed, 25 Feb 2026 14:46:00 -0300 Subject: [PATCH 7/7] flake: bump to GHC 9.12 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 08cdcc85e..b12e9da3b 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ configureFlags = attrs.configureFlags ++ [ "--enable-static" ]; })); - hspkgs = ps: ps.haskellPackages; + hspkgs = ps: ps.haskell.packages.ghc912; hlib = pkgs.haskell.lib; # base hevm derivation.