dvtm: allow user configuration

This commit is contained in:
Rahul Gopinath 2016-06-27 12:05:38 -07:00
parent 323eb06499
commit d60a41053e
2 changed files with 15 additions and 5 deletions

View File

@ -1,13 +1,15 @@
{ stdenv, fetchurl, ncurses }:
{ stdenv, fetchurl, ncurses, customConfig ? null }:
stdenv.mkDerivation rec {
name = "dvtm-0.15";
meta = {
meta = with stdenv.lib; {
description = "Dynamic virtual terminal manager";
homepage = http://www.brain-dump.org/projects/dvtm;
license = stdenv.lib.licenses.mit;
platfroms = stdenv.lib.platforms.linux;
license = licenses.mit;
platfroms = platforms.linux;
maintainers = [ maintainers.vrthra ];
};
src = fetchurl {
@ -15,6 +17,10 @@ stdenv.mkDerivation rec {
sha256 = "0475w514b7i3gxk6khy8pfj2gx9l7lv2pwacmq92zn1abv01a84g";
};
postPatch = stdenv.lib.optionalString (customConfig != null) ''
cp ${builtins.toFile "config.h" customConfig} ./config.h
'';
buildInputs = [ ncurses ];
prePatch = ''

View File

@ -1370,7 +1370,11 @@ in
dvgrab = callPackage ../tools/video/dvgrab { };
dvtm = callPackage ../tools/misc/dvtm { };
dvtm = callPackage ../tools/misc/dvtm {
# if you prefer a custom config, write the config.h in dvtm.config.h
# and enable
# customConfig = builtins.readFile ./dvtm.config.h;
};
e2tools = callPackage ../tools/filesystems/e2tools { };