brewery
notashelf /
15a4a97033d61c56a0c0031fe24cae6266e1417c

beer

public

A terminal worth pouring time into

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/beer.git
nix/shell.nixNix57 lines1.0 KB
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
  scdoc,
13
  wayland,
14
  wayland-protocols,
15
  wayland-scanner,
16
  libxkbcommon,
17
  freetype,
18
  fontconfig,
19
  harfbuzz,
20
}:
21
mkShell {
22
  name = "beer-dev";
23
24
  strictDeps = true;
25
  nativeBuildInputs = [
26
    cargo
27
    rustc
28
    clippy
29
    rustfmt
30
    taplo
31
    rust-analyzer
32
    cargo-deny
33
    pkg-config
34
    ncurses # tic, to compile the terminfo entry
35
    scdoc # generate man pages from doc/*.scd
36
  ];
37
38
  buildInputs = [
39
    wayland
40
    wayland-protocols
41
    wayland-scanner
42
    libxkbcommon
43
    freetype
44
    fontconfig
45
    harfbuzz
46
  ];
47
48
  # Compile the beer terminfo into a project-local database and put it ahead of
49
  # the system one, so TERM=beer resolves inside the shell (and for the shell
50
  # beer spawns, which inherits this env). The trailing ':' keeps the system
51
  # database on the search path.
52
  shellHook = ''
53
    if tic -x -o "$PWD/.terminfo" terminfo/beer.info 2>/dev/null; then
54
      export TERMINFO_DIRS="$PWD/.terminfo:"
55
    fi
56
  '';
57
}