Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (52 loc) · 1.91 KB
/
Copy pathflake.nix
File metadata and controls
61 lines (52 loc) · 1.91 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem ["x86_64-linux" "x86_64-darwin" "aarch64-darwin"] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.gotraceui = pkgs.buildGo124Module {
name = "gotraceui";
src = self;
vendorHash = "sha256-SbEfEeeXkOrVKAe8k6KZ1T5iZff+CqpbEn+hdTvNGUA=";
subPackages = ["cmd/gotraceui"];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = with pkgs;
(if stdenv.isLinux then [
vulkan-headers
libxkbcommon
wayland
xorg.libxcb
xorg.libX11
xorg.libXcursor
xorg.libXfixes
libGL
] else if stdenv.isDarwin then [
apple-sdk
] else [ ]);
ldflags = ["-X gioui.org/app.ID=co.honnef.Gotraceui"];
postInstall = ''
cp -r share $out/
'';
meta = with nixpkgs.lib; {
description = "An efficient frontend for Go execution traces";
homepage = "https://github.com/dominikh/gotraceui";
license = licenses.mit;
platforms = platforms.all;
};
};
packages.default = self.packages.${system}.gotraceui;
apps.gotraceui = flake-utils.lib.mkApp { drv = self.packages.${system}.gotraceui; };
apps.default = self.apps.${system}.gotraceui;
devShells.gotraceui = pkgs.mkShell {
inputsFrom = builtins.attrValues self.packages.${system};
nativeBuildInputs = [ pkgs.python3Packages.fonttools ];
};
devShells.default = self.devShells.${system}.gotraceui;
}
);
}