forked from NotAShelf/beer
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I76a1ac451259af5b4eb86a609b367ca36a6a6964
57 lines
1 KiB
Nix
57 lines
1 KiB
Nix
{
|
|
mkShell,
|
|
rustc,
|
|
cargo,
|
|
rust-analyzer,
|
|
rustfmt,
|
|
clippy,
|
|
taplo,
|
|
cargo-deny,
|
|
pkg-config,
|
|
ncurses,
|
|
scdoc,
|
|
wayland,
|
|
wayland-protocols,
|
|
wayland-scanner,
|
|
libxkbcommon,
|
|
freetype,
|
|
fontconfig,
|
|
harfbuzz,
|
|
}:
|
|
mkShell {
|
|
name = "beer-dev";
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [
|
|
cargo
|
|
rustc
|
|
clippy
|
|
rustfmt
|
|
taplo
|
|
rust-analyzer
|
|
cargo-deny
|
|
pkg-config
|
|
ncurses # tic, to compile the terminfo entry
|
|
scdoc # generate man pages from doc/*.scd
|
|
];
|
|
|
|
buildInputs = [
|
|
wayland
|
|
wayland-protocols
|
|
wayland-scanner
|
|
libxkbcommon
|
|
freetype
|
|
fontconfig
|
|
harfbuzz
|
|
];
|
|
|
|
# Compile the beer terminfo into a project-local database and put it ahead of
|
|
# the system one, so TERM=beer resolves inside the shell (and for the shell
|
|
# beer spawns, which inherits this env). The trailing ':' keeps the system
|
|
# database on the search path.
|
|
shellHook = ''
|
|
if tic -x -o "$PWD/.terminfo" terminfo/beer.info 2>/dev/null; then
|
|
export TERMINFO_DIRS="$PWD/.terminfo:"
|
|
fi
|
|
'';
|
|
}
|