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