2021-08-02 09:38:45 +00:00
|
|
|
{ lib, stdenv, ncurses, customConfig ? null, pname, version, src, patches ? [] }:
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2018-11-05 00:49:50 +00:00
|
|
|
|
2021-08-02 09:38:45 +00:00
|
|
|
inherit pname version src patches;
|
2018-11-05 00:49:50 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
CFLAGS = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE";
|
2018-11-05 00:49:50 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
postPatch = lib.optionalString (customConfig != null) ''
|
2018-11-05 00:49:50 +00:00
|
|
|
cp ${builtins.toFile "config.h" customConfig} ./config.h
|
|
|
|
'';
|
|
|
|
|
2020-04-06 15:04:25 +00:00
|
|
|
nativeBuildInputs = [ ncurses ];
|
2018-11-05 00:49:50 +00:00
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace /usr/share/terminfo $out/share/terminfo
|
|
|
|
'';
|
|
|
|
|
2020-04-06 15:04:25 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2018-11-05 00:49:50 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-11-05 00:49:50 +00:00
|
|
|
description = "Dynamic virtual terminal manager";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.brain-dump.org/projects/dvtm";
|
2018-11-05 00:49:50 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.vrthra ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|