-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathflake.nix
45 lines (42 loc) · 1.05 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
description = "naiserator";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { nixpkgs, ... }:
let
goOverlay = final: prev: {
go = prev.go.overrideAttrs (old: {
version = "1.23.0";
src = prev.fetchurl {
url = "https://go.dev/dl/go1.23.0.src.tar.gz";
hash = "sha256-Qreo6A2AXaoDAi7T/eQyHUw78smQoUQWXQHu7Nb2mcY=";
};
});
};
withSystem = nixpkgs.lib.genAttrs [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
withPkgs = callback:
withSystem (system:
callback (import nixpkgs {
inherit system;
overlays = [ goOverlay ];
}));
in {
devShells = withPkgs (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gopls
gotools
go-tools
gnumake
gofumpt
];
};
});
formatter = withPkgs (pkgs: pkgs.nixfmt-rfc-style);
};
}