Skip to content

Commit baca8d0

Browse files
fix nix build
1 parent 4eef708 commit baca8d0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

flake.nix

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
let
1212
pkgs = import nixpkgs { inherit system; };
1313

14+
# Pin Go 1.25 — onflow/crypto v0.25.4 is incompatible with Go 1.26
15+
# (see https://github.com/onflow/crypto/issues/40).
16+
# Go 1.26 changed ecdsa.PrivateKey.ECDH() to go through a FIPS path
17+
# that dereferences PublicKey.X/Y before they are set, causing a nil
18+
# pointer panic in goecdsaPrivateKey(). Remove this pin once
19+
# onflow/crypto ships a Go 1.26-compatible release.
20+
go = pkgs.go_1_25;
21+
buildGoModule = pkgs.buildGoModule.override { inherit go; };
22+
1423
# Version detection:
1524
# - When building from a git tag (e.g., nix build github:onflow/flow-cli/v2.14.2),
1625
# the version is extracted from the tag.
@@ -33,7 +42,7 @@
3342
in
3443
{
3544
packages = {
36-
flow-cli = pkgs.buildGoModule {
45+
flow-cli = buildGoModule {
3746
pname = "flow-cli";
3847
version = version;
3948
src = ./.;
@@ -81,7 +90,7 @@
8190

8291
devShells.default = pkgs.mkShell {
8392
buildInputs = with pkgs; [
84-
go
93+
go_1_25
8594
golangci-lint
8695
gotools
8796
gopls

0 commit comments

Comments
 (0)