-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (56 loc) · 1.64 KB
/
Copy pathflake.nix
File metadata and controls
61 lines (56 loc) · 1.64 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Offline-First Flake
#
# If your network is flaky or down, use:
# nix develop --offline
#
# To load from another directory (before direnv triggers):
# nix develop ~/projects/greenlight-client --offline
# # or
# nix develop path:~/projects/greenlight-client --offline
#
# This skips the freshness check and uses the cached flake.lock inputs directly.
# The inputs below are pinned to direct GitHub URLs (not indirect registry names)
# to avoid querying the global flake registry at install.determinate.systems.
{
description = "Greenlight Client Go Development Environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
name = "greenlight-client-shell";
nativeBuildInputs = with pkgs; [
# air # Live reload
just # Task runner (Alternative to gnumake)
go
gcc
gopls # LSP
pkg-config # Helper to find C libraries
upx # Binary compression tool
golangci-lint
go-tools # (Provides the staticcheck binary)
];
buildInputs = with pkgs; [
# Libraries go here (openssl, etc.)
];
# Environment Variables
shellHook = ''
# export CGO_ENABLED=0
echo "❄️ Development environment loaded!"
'';
};
}
);
}