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

46 lines
1.2 KiB
Nix
Raw Normal View History

2016-06-27 20:05:38 +01:00
{ stdenv, fetchurl, ncurses, customConfig ? null }:
2014-01-01 13:55:49 +00:00
stdenv.mkDerivation rec {
2016-06-27 20:05:38 +01:00
2016-02-08 05:09:29 +00:00
name = "dvtm-0.15";
2014-01-01 13:55:49 +00:00
src = fetchurl {
url = "${meta.homepage}/${name}.tar.gz";
2016-02-08 05:09:29 +00:00
sha256 = "0475w514b7i3gxk6khy8pfj2gx9l7lv2pwacmq92zn1abv01a84g";
2014-01-01 13:55:49 +00:00
};
patches = [
# https://github.com/martanne/dvtm/pull/69
# Use self-pipe instead of signal blocking fixes issues on darwin.
(fetchurl {
url = "https://github.com/martanne/dvtm/commit/1f1ed664d64603f3f1ce1388571227dc723901b2.patch";
sha256 = "1cby8x3ckvhzqa8yxlfrwzgm8wk7yz84kr9psdjr7xwpnca1cqrd";
})
];
CFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE";
2016-06-27 20:05:38 +01:00
postPatch = stdenv.lib.optionalString (customConfig != null) ''
cp ${builtins.toFile "config.h" customConfig} ./config.h
'';
2014-01-01 13:55:49 +00:00
buildInputs = [ ncurses ];
prePatch = ''
substituteInPlace Makefile \
--replace /usr/share/terminfo $out/share/terminfo
'';
installPhase = ''
make PREFIX=$out install
'';
meta = with stdenv.lib; {
description = "Dynamic virtual terminal manager";
homepage = http://www.brain-dump.org/projects/dvtm;
license = licenses.mit;
maintainers = [ maintainers.vrthra ];
platforms = platforms.unix;
};
2014-01-01 13:55:49 +00:00
}