terminfos: init

This commit is contained in:
Luke Granger-Brown 2023-01-15 16:10:12 +00:00
parent b0e68cc4fe
commit e2b9b63743
3 changed files with 56 additions and 3 deletions

View file

@ -82,4 +82,6 @@
fr24feed = pkgs.callPackage ./fr24feed { };
qrca = pkgs.libsForQt5.callPackage ./qrca { };
terminfos = pkgs.callPackage ./terminfos { };
} // (import ./heptapod-runner args)

View file

@ -0,0 +1,32 @@
{ stdenvNoCC, kitty, ncurses, rxvt-unicode-unwrapped, alacritty, symlinkJoin }:
let
kitty-terminfo = stdenvNoCC.mkDerivation {
pname = "kitty-terminfo";
inherit (kitty) version src;
dontBuild = true;
nativeBuildInputs = [
ncurses
];
installPhase = ''
runHook preInstall
install -d $out/share/terminfo
export TERMINFO=$out/share/terminfo
tic -x terminfo/kitty.terminfo
runHook postInstall
'';
};
in
symlinkJoin {
name = "terminfos";
paths = [
kitty-terminfo
rxvt-unicode-unwrapped.terminfo
alacritty.terminfo
];
}

View file

@ -1,6 +1,23 @@
{ config, configName, depot, lib, pkgs, ... }:
let
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
kitty-terminfo = pkgs.mkDerivation {
pname = "kitty-terminfo";
inherit (pkgs.kitty) version src;
dontBuild = true;
installPhase = ''
runHook preInstall
install -d $out/share/terminfo
export TERMINFO=$out/share/terminfo
tic terminfo/kitty.terminfo
runHook postInstall
'';
};
in
{
imports = [ ./ntfy.nix ];
@ -26,7 +43,9 @@ in
home.homeDirectory = if isDarwin then "/Users/lukegb" else "/home/lukegb";
home.file = {
".hgrc".source = ./hgrc;
};
} // (lib.optionalAttrs isDarwin {
".terminfo".source = depot.nix.pkgs.terminfos;
});
home.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
@ -133,8 +152,8 @@ in
#!/bin/sh
exec "${home-manager}/bin/home-manager" -f "${config.home.homeDirectory}/depot/home-manager-ext.nix" -A "${configName}" "$@"
'')
rxvt-unicode-unwrapped.terminfo tmux rsync libarchive tcpdump restic
alacritty.terminfo kitty.terminfo
tmux rsync libarchive tcpdump restic
depot.nix.pkgs.terminfos
iftop htop jq
depot.nix.pkgs.mercurial
] ++ lib.optionals isLinux [