-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
110 lines (97 loc) · 2.36 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
inputs.nixpkgs.url = "github:paveloom/nixpkgs/system";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {
self,
nixpkgs,
flake-utils,
}: let
platforms = [
"aarch64-linux"
"x86_64-linux"
];
in
flake-utils.lib.eachSystem platforms (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
llvm = pkgs.llvmPackages_16;
llvmStdenv = llvm.stdenv.override (old: {
cc = old.cc.override {
inherit (llvm) bintools;
};
});
ccacheStdenv = pkgs.ccacheStdenv.override {
stdenv = pkgs.stdenvAdapters.useMoldLinker llvmStdenv;
};
nativeBuildInputsRelease = with pkgs; [
blueprint-compiler
desktop-file-utils
libxml2
meson
ninja
pkg-config
wrapGAppsHook4
];
nativeBuildInputsDebug = with pkgs; [
alejandra
appstream-glib
bashInteractive
ccache
clang-analyzer
clang-tools_16
cppcheck
cpplint
curl
gdb
gnome.devhelp
iproute2
libxml2
netcat
nettools
nil
nix-output-monitor
nix-tree
nvd
pvs-studio
rr
shellcheck
swift-mesonlsp
valgrind
];
buildInputs = with pkgs; [
json-glib
libadwaita
libsecret
libsoup_3
];
in {
devShells.default = ccacheStdenv.mkDerivation {
name = "kirk-env";
nativeBuildInputs = nativeBuildInputsRelease ++ nativeBuildInputsDebug;
inherit buildInputs;
env = {
GLIB_SUPP_FILE = "${pkgs.glib.dev}/share/glib-2.0/valgrind/glib.supp";
GTK_SUPP_FILE = "${pkgs.gtk4}/share/gtk-4.0/valgrind/gtk.supp";
NIX_HARDENING_ENABLE = "";
XDG_DATA_DIRS = nixpkgs.lib.makeSearchPathOutput "devdoc" "share" (with pkgs; [
glib
gtk4
json-glib
libadwaita
libsecret
libsoup_3
]);
};
};
packages.default = llvmStdenv.mkDerivation {
pname = "kirk";
version = "0.1.0";
src = ./.;
nativeBuildInputs = nativeBuildInputsRelease;
inherit buildInputs;
mesonBuildType = "release";
};
});
}