Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
84 lines (81 loc) · 2.24 KB
/
Copy pathflake.nix
File metadata and controls
84 lines (81 loc) · 2.24 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
env.CGO_ENABLED = 0;
packages.default = pkgs.buildGo127Module {
pname = "argonaut";
name = "argonaut";
meta = with pkgs.lib; {
description = "Keyboard-first terminal UI for Argo CD";
homepage = "https://github.com/darksworm/argonaut";
license = licenses.gpl3Only;
maintainers = [
maintainers.okwilkins
"darksworm"
];
mainProgram = "argonaut";
};
src = ./.;
vendorHash = "sha256-pJ/tE7Wrkk5RbXdWYrdGVK5New/wAtTAAPGLknaf2uw=";
proxyVendor = true;
subPackages = [ "cmd/app" ];
ldflags = [
"-s"
"-w"
"-X main.commit=${self.rev or "dev"}"
"-X main.buildDate=1970-01-01T00:00:00Z"
];
# Skip tests as Nix has limited network access
checkFlags = [
"-skip=TestLoadPool|TestNewHTTP"
];
postInstall = ''
mv $out/bin/app $out/bin/argonaut
'';
};
apps.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/argonaut";
};
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
packages = with pkgs; [
self.packages.${system}.default
argocd
delta
go_1_27
gopls
gotools
golangci-lint
watchexec
];
shellHook = ''
echo "Argonaut development environment"
echo "Go version: $(go version)"
'';
};
checks = {
build = self.packages.${system}.default;
format = pkgs.runCommand "check-format" { } ''
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check ${./.}
touch $out
'';
};
}
);
}