-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
40 lines (36 loc) · 895 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
31
32
33
34
35
36
37
38
39
40
{
description = "A Nix-flake-based Node.js development environment";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = {
self,
nixpkgs,
}: let
allSystems = ["x86_64-linux"];
forAllSystems = fn:
nixpkgs.lib.genAttrs allSystems
(system: fn {pkgs = import nixpkgs {inherit system;};});
in {
devShells = forAllSystems ({pkgs}: {
default = pkgs.mkShell {
shellHook = ''
echo "🚀 Welcome to Go development environment"
echo "Go version: $(go version)"
'';
packages = with pkgs; [
# Go related
go
gopls
go-tools
golangci-lint
# Build tools
gcc
gnumake
];
env = {
GOPATH = "${placeholder "out"}/go";
CGO_ENABLED = "1";
};
};
});
};
}