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