st: Make patches configurable via config.st.patches.

This commit is contained in:
Moritz Ulrich 2016-04-12 22:44:07 +02:00
parent b0d2c0cade
commit 0bda52462b
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft, fontconfig
, conf? null}:
, conf ? null, patches ? []}:
with stdenv.lib;
@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "0avsfc1qp8zvshsfjwwrkvk411jlqy58z225bsdhjkl1qc40qcc5";
};
inherit patches;
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, writeText
, ncurses, wayland, wld, libxkbcommon, fontconfig, pixman
, conf? null}:
, conf ? null, patches ? [] }:
with stdenv.lib;
@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "7164da135f02405dba5ae3131dfd896e072df29ac6c0928f3b887beffb8a7d97";
};
inherit patches;
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";

View File

@ -13722,10 +13722,12 @@ in
st = callPackage ../applications/misc/st {
conf = config.st.conf or null;
patches = config.st.patches or null;
};
st-wayland = callPackage ../applications/misc/st/wayland.nix {
conf = config.st.conf or null;
patches = config.st.patches or null;
};
stag = callPackage ../applications/misc/stag {