Skip to content

Commit 823f775

Browse files
committed
feat(nix): move go into overlay
1 parent 2dbbe4f commit 823f775

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

flake.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
perSystem =
2121
{
2222
pkgs,
23+
system,
2324
...
2425
}:
2526
let
@@ -32,7 +33,9 @@
3233
else
3334
throw "Could not extract Go version from go.mod";
3435

35-
go = pkgs."go_${builtins.replaceStrings [ "." ] [ "_" ] goVersion}";
36+
goOverlay = final: prev: {
37+
go = prev."go_${builtins.replaceStrings [ "." ] [ "_" ] goVersion}";
38+
};
3639

3740
lazygit = pkgs.buildGoModule rec {
3841
pname = "lazygit";
@@ -76,6 +79,12 @@
7679
};
7780
in
7881
{
82+
_module.args.pkgs = import inputs.nixpkgs {
83+
inherit system;
84+
overlays = [ goOverlay ];
85+
config = { };
86+
};
87+
7988
packages = {
8089
default = lazygit;
8190
inherit lazygit;

0 commit comments

Comments
 (0)