3
0
Fork 0
forked from mirrors/nixpkgs

tabbed: add patch support

Suckless tools encourage patching, along with config.h modification. Allow
users to provide their own patches.
This commit is contained in:
Rahul Gopinath 2016-06-29 12:28:13 -07:00
parent 37b5928a81
commit 2c44e0410c

View file

@ -1,4 +1,4 @@
{stdenv, fetchgit, xproto, libX11, enableXft, libXft, customConfig ? null }: {stdenv, fetchgit, xproto, libX11, libXft, customConfig ? null, patches ? [] }:
with stdenv.lib; with stdenv.lib;
@ -11,15 +11,17 @@ stdenv.mkDerivation rec {
sha256 = "1fiv57g3jnlhnb6zrzl3n6lnpn2s9s0sd7bcv7r1nb3grwy7icri"; sha256 = "1fiv57g3jnlhnb6zrzl3n6lnpn2s9s0sd7bcv7r1nb3grwy7icri";
}; };
inherit patches;
postPatch = stdenv.lib.optionalString (customConfig != null) '' postPatch = stdenv.lib.optionalString (customConfig != null) ''
cp ${builtins.toFile "config.h" customConfig} ./config.h cp ${builtins.toFile "config.h" customConfig} ./config.h
''; '';
buildInputs = [ xproto libX11 libXft ]; buildInputs = [ xproto libX11 libXft ];
preInstall = '' makeFlags = [
export makeFlags="PREFIX=$out" "PREFIX=$(out)"
''; ];
meta = { meta = {
homepage = http://tools.suckless.org/tabbed; homepage = http://tools.suckless.org/tabbed;