| 1 | { |
| 2 | mkShell, |
| 3 | rustc, |
| 4 | cargo, |
| 5 | rust-analyzer, |
| 6 | rustfmt, |
| 7 | clippy, |
| 8 | taplo, |
| 9 | cargo-deny, |
| 10 | pkg-config, |
| 11 | ncurses, |
| 12 | wayland, |
| 13 | wayland-protocols, |
| 14 | wayland-scanner, |
| 15 | libxkbcommon, |
| 16 | freetype, |
| 17 | fontconfig, |
| 18 | harfbuzz, |
| 19 | }: |
| 20 | mkShell { |
| 21 | name = "beer-dev"; |
| 22 | |
| 23 | strictDeps = true; |
| 24 | nativeBuildInputs = [ |
| 25 | cargo |
| 26 | rustc |
| 27 | clippy |
| 28 | rustfmt |
| 29 | taplo |
| 30 | rust-analyzer |
| 31 | cargo-deny |
| 32 | pkg-config |
| 33 | ncurses # tic, to compile the terminfo entry |
| 34 | ]; |
| 35 | |
| 36 | buildInputs = [ |
| 37 | wayland |
| 38 | wayland-protocols |
| 39 | wayland-scanner |
| 40 | libxkbcommon |
| 41 | freetype |
| 42 | fontconfig |
| 43 | harfbuzz |
| 44 | ]; |
| 45 | |
| 46 | # Compile the beer terminfo into a project-local database and put it ahead of |
| 47 | # the system one, so TERM=beer resolves inside the shell (and for the shell |
| 48 | # beer spawns, which inherits this env). The trailing ':' keeps the system |
| 49 | # database on the search path. |
| 50 | shellHook = '' |
| 51 | if tic -x -o "$PWD/.terminfo" terminfo/beer.info 2>/dev/null; then |
| 52 | export TERMINFO_DIRS="$PWD/.terminfo:" |
| 53 | fi |
| 54 | ''; |
| 55 | } |