-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
30 lines (26 loc) · 831 Bytes
/
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
{
description = "Go kit application extensions";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
buildDeps = with pkgs; [ git go gnumake ];
devDeps = with pkgs; buildDeps ++ [ golangci-lint gotestsum ];
goShell = go:
pkgs.mkShell {
buildInputs = (pkgs.lib.remove pkgs.go devDeps) ++ [ go ];
};
in
{
devShell = pkgs.mkShell {
buildInputs = devDeps;
};
devShells.go1_21 = goShell pkgs.go_1_21;
devShells.go1_22 = goShell pkgs.go_1_22;
devShells.go1_23 = goShell pkgs.go_1_23;
});
}