Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
81 lines (69 loc) · 2.07 KB
/
Copy pathflake.nix
File metadata and controls
81 lines (69 loc) · 2.07 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
{
description = "Updo - Website monitoring tool for tracking uptime and performance";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.buildGoModule rec {
pname = "updo";
version = "0.4.8";
src = ./.;
vendorHash = "sha256-I5Cu0cXNsPoVBgouE+hRn/s1x2IbRt+V6kHDcfiRIfA=";
# Exclude the lambda directory as it's a separate module
excludedPackages = [ "./lambda" ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=${src.rev or "unknown"}"
"-X main.date=1970-01-01T00:00:00Z"
];
meta = with pkgs.lib; {
description = "Command-line tool for monitoring website uptime and performance";
homepage = "https://github.com/Owloops/updo";
license = licenses.mit;
maintainers = [ ];
mainProgram = "updo";
};
};
updo = self.packages.${system}.default;
}
);
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/updo";
};
updo = self.apps.${system}.default;
});
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gopls
gotools
go-tools
];
shellHook = ''
echo "Updo development environment"
echo "Go version: $(go version)"
'';
};
}
);
};
}