this repo has no description
1# Development shell for working on Darling.
2#
3# Provides all build dependencies, debugging tools, and editor
4# integration (clangd, nil, nixfmt) so that `nix develop` or
5# direnv gives a fully-equipped environment.
6pkgs: {
7 stdenv = pkgs.clangStdenv;
8
9 packages = with pkgs; [
10 # ── Build dependencies ──────────────────────────────────────
11 cmake
12 ninja
13 pkg-config
14 bison
15 flex
16 python3
17 makeWrapper
18
19 # ── Libraries (needed by cmake at configure time) ──────────
20 freetype
21 libjpeg
22 libpng
23 libtiff
24 giflib
25 libX11
26 libXext
27 libXrandr
28 libXcursor
29 libxkbfile
30 cairo
31 libglvnd
32 fontconfig
33 dbus
34 libGLU
35 fuse
36 ffmpeg
37 pulseaudio
38 libbsd
39 openssl
40 xdg-user-dirs
41
42 # ── Debugging & analysis ────────────────────────────────────
43 gdb
44 strace
45 rizin
46 file
47
48 # ── Code exploration ────────────────────────────────────────
49 ripgrep
50 fd
51 jq
52
53 # ── Nix tooling (for Zed / editor integration) ─────────────
54 nil
55 nixfmt
56
57 # ── C/C++ tooling (for Zed / clangd) ───────────────────────
58 clang-tools
59 ];
60
61 env = {
62 # Make cmake produce compile_commands.json so clangd works.
63 CMAKE_EXPORT_COMPILE_COMMANDS = "1";
64 };
65
66 shellHook = ''
67 echo "🍎 darling-nix devShell loaded"
68 echo " clang: $(clang --version | head -1)"
69 echo " cmake: $(cmake --version | head -1)"
70 echo ""
71 echo "Quick start:"
72 echo " mkdir -p build && cd build"
73 echo " cmake -G Ninja .."
74 echo " ninja -j\$(nproc)"
75 '';
76}