nixos/malte/cataclysm-dda.nix

33 lines
876 B
Nix

{ pkgs, ... }:
let
font =
"${pkgs.firaCodeNerd}/share/fonts/truetype/NerdFonts/Fira Code Bold Nerd Font Complete Mono.ttf";
# Set SDL_VIDEODRIVER=wayland to run it natively. Currently still needs the patch
# in ../patches/cdda-wayland-sdl-fix.patch.
cataclysm-dda-wayland-sdl = pkgs.symlinkJoin {
name = "cataclysm-tiles";
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/cataclysm-tiles --set SDL_VIDEODRIVER wayland
'';
paths = [ pkgs.cataclysm-dda-git ];
};
in {
home.packages = [ cataclysm-dda-wayland-sdl pkgs.firaCodeNerd ];
# Configure the fonts being used
# TODO: Cataclysm replaces this with a file..
#xdg.configFile."cataclysm-dda/fonts.json".text = ''
# {
# "typeface": [ "${font}" ],
# "map_typeface": [ "${font}" ],
# "overmap_typeface": [ "${font}" ]
# }
#'';
}