Nix · 506 bytes Raw Blame History
1 { pkgs ? import <nixpkgs> {} }:
2
3 pkgs.mkShell {
4 buildInputs = with pkgs; [
5 rustc
6 cargo
7 pkg-config
8
9 # X11 dependencies
10 xorg.libX11
11 xorg.libXcursor
12 xorg.libXrandr
13 xorg.libXi
14 xorg.libxcb
15
16 # For testing in nested X
17 xorg.xorgserver
18 ];
19
20 shellHook = ''
21 echo "gar development shell"
22 echo "Run 'cargo build' to build"
23 echo "Test with: Xephyr -br -ac -noreset -screen 1280x720 :1 &"
24 echo "Then: DISPLAY=:1 cargo run"
25 '';
26
27 RUST_BACKTRACE = "1";
28 }