Skip to content

Commit 5b29b0d

Browse files
committed
fixup: Update to use avalanchego's golang flake for 1.24.8
1 parent 3f33ee6 commit 5b29b0d

File tree

3 files changed

+50
-6
lines changed

3 files changed

+50
-6
lines changed

ffi/flake.lock

Lines changed: 39 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/flake.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
rust-overlay.url = "github:oxalica/rust-overlay";
1313
crane.url = "github:ipetkov/crane";
1414
flake-utils.url = "github:numtide/flake-utils";
15+
golang.url = "github:ava-labs/avalanchego?dir=nix/go&ref=edf67505fee7c95837c2220467de86fea0efc860";
1516
};
1617

17-
outputs = { self, nixpkgs, rust-overlay, crane, flake-utils }:
18+
outputs = { self, nixpkgs, rust-overlay, crane, flake-utils, golang }:
1819
flake-utils.lib.eachDefaultSystem (system:
1920
let
2021
overlays = [ (import rust-overlay) ];
2122
pkgs = import nixpkgs { inherit system overlays; };
2223
inherit (pkgs) lib;
2324

25+
go = golang.packages.${system}.default;
26+
2427
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
2528
extensions = [ "rust-src" "rustfmt" "clippy" ];
2629
};
@@ -82,7 +85,7 @@
8285
8386
# Run go generate to switch CGO directives to STATIC_LIBS mode
8487
cd $out/ffi
85-
HOME=$TMPDIR GOTOOLCHAIN=local FIREWOOD_LD_MODE=STATIC_LIBS ${pkgs.go}/bin/go generate
88+
HOME=$TMPDIR GOTOOLCHAIN=local FIREWOOD_LD_MODE=STATIC_LIBS ${go}/bin/go generate
8689
'';
8790

8891
meta = with lib; {
@@ -104,7 +107,7 @@
104107

105108
apps.go = {
106109
type = "app";
107-
program = "${pkgs.go}/bin/go";
110+
program = "${go}/bin/go";
108111
};
109112

110113
devShells.default = craneLib.devShell {

ffi/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ module github.com/ava-labs/firewood/ffi
22

33
go 1.24
44

5+
// Changes to the toolchain version should be replicated in:
6+
// - ffi/go.mod (here)
7+
// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version)
8+
// - ffi/tests/eth/go.mod
9+
// - ffi/tests/firewood/go.mod
510
toolchain go1.24.8
611

712
require (

0 commit comments

Comments
 (0)