2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, ncurses, customConfig ? null, name, src, patches ? [] }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
|
|
inherit name src patches;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
CFLAGS = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
postPatch = lib.optionalString (customConfig != null) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
cp ${builtins.toFile "config.h" customConfig} ./config.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ncurses ];
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace /usr/share/terminfo $out/share/terminfo
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Dynamic virtual terminal manager";
|
|
|
|
homepage = "http://www.brain-dump.org/projects/dvtm";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.vrthra ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|