nixpkgs/pkgs/tools/misc/dvtm/dvtm.nix

30 lines
794 B
Nix
Raw Normal View History

{ 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
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
'';
nativeBuildInputs = [ ncurses ];
2018-11-05 00:49:50 +00:00
buildInputs = [ ncurses ];
prePatch = ''
substituteInPlace Makefile \
--replace /usr/share/terminfo $out/share/terminfo
'';
makeFlags = [ "PREFIX=$(out)" ];
2018-11-05 00:49:50 +00:00
meta = with lib; {
2018-11-05 00:49:50 +00:00
description = "Dynamic virtual terminal manager";
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;
};
}