-
Notifications
You must be signed in to change notification settings - Fork 7
/
flake.nix
42 lines (38 loc) · 1.21 KB
/
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
41
42
{
description = "Nix flake for ToxStatus";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
toxStatusVersion = "2.0.0-dev1";
in {
packages = flake-utils.lib.flattenTree rec {
default = toxstatus;
toxstatus = with pkgs; buildGoModule rec {
pname = "toxstatus";
version = toxStatusVersion;
src = ./.;
subPackages = [ "cmd/toxstatus" ];
vendorHash = "sha256-kD00o5RpT+qq9QJAUR5NLgwMQn6IofkdpWk2mbfBa2g=";
ldflags = let
pkgPath = "github.com/Tox/ToxStatus/internal/version";
in [
"-X ${pkgPath}.Number=${version}"
"-X ${pkgPath}.Revision=${self.shortRev or "dirty"}"
"-X ${pkgPath}.RevisionTime=${toString self.lastModified}"
];
doCheck = false;
};
};
devShell = with pkgs; mkShell {
hardeningDisable = [ "fortify" ];
buildInputs = [
go
graphviz # for pprof
sqlite
];
};
}
);
}