-
Notifications
You must be signed in to change notification settings - Fork 9
/
debug-tools.nix
46 lines (40 loc) · 930 Bytes
/
debug-tools.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
{ lib,
stdenv,
cmake,
cmake_modules,
pkg-config,
boost,
clang,
clang-tools,
gtk4,
gtkmm4,
glibmm,
pcre2,
glib,
gdb,
lldb,
ninja,
pango,
pangomm,
}:
let
inherit (lib) optional;
in stdenv.mkDerivation {
name = "debug-tools";
src = lib.sourceByRegex ./. ["^crypto3(/.*)?$" "^parallel-crypto3(/.*)?$" "CMakeLists.txt"];
nativeBuildInputs = [ cmake ninja pkg-config ] ++
(lib.optional (!stdenv.isDarwin) gdb) ++
(lib.optional (stdenv.isDarwin) lldb);
propagatedBuildInputs = [ boost gtk4 gtkmm4 glibmm pcre2 glib pango pangomm ];
buildInputs = [ cmake_modules ];
cmakeFlags =
[
"-DCMAKE_BUILD_TYPE=Release"
"-DDEBUG_TOOLS_ENABLE=TRUE"
"-G Ninja"
];
shellHook = ''
PS1="\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
echo "Welcome to debug-tools development environment!"
'';
}