From 0bda52462bc1a1ac5d526dbb490a219ea02b79cf Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Tue, 12 Apr 2016 22:44:07 +0200 Subject: [PATCH] st: Make patches configurable via config.st.patches. --- pkgs/applications/misc/st/default.nix | 4 +++- pkgs/applications/misc/st/wayland.nix | 4 +++- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/st/default.nix b/pkgs/applications/misc/st/default.nix index 234e8b6ba694..deceba0ea554 100644 --- a/pkgs/applications/misc/st/default.nix +++ b/pkgs/applications/misc/st/default.nix @@ -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"; diff --git a/pkgs/applications/misc/st/wayland.nix b/pkgs/applications/misc/st/wayland.nix index ed7e0cf7ca1d..4d9f0ef3f8d5 100644 --- a/pkgs/applications/misc/st/wayland.nix +++ b/pkgs/applications/misc/st/wayland.nix @@ -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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 66ab3de91e22..37175481798c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {