From 473f864a1f819776cc1bcc9014ae10f19e88deed Mon Sep 17 00:00:00 2001 From: Rahul Gopinath Date: Wed, 29 Jun 2016 12:20:16 -0700 Subject: [PATCH 1/3] tabbed: Add configuration through config.h --- pkgs/applications/window-managers/tabbed/default.nix | 8 ++++++-- pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/window-managers/tabbed/default.nix b/pkgs/applications/window-managers/tabbed/default.nix index 68c72a20e67..6fefb219158 100644 --- a/pkgs/applications/window-managers/tabbed/default.nix +++ b/pkgs/applications/window-managers/tabbed/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchgit, xproto, libX11, enableXft, libXft}: +{stdenv, fetchgit, xproto, libX11, enableXft, libXft, customConfig ? null }: with stdenv.lib; @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { patches = optional enableXft ./xft.patch; + postPatch = stdenv.lib.optionalString (customConfig != null) '' + cp ${builtins.toFile "config.h" customConfig} ./config.h + ''; + buildInputs = [ xproto libX11 ] ++ optional enableXft libXft; preInstall = '' @@ -23,7 +27,7 @@ stdenv.mkDerivation rec { homepage = http://tools.suckless.org/tabbed; description = "Simple generic tabbed fronted to xembed aware applications"; license = licenses.mit; - maintainers = with maintainers; [ viric ]; + maintainers = with maintainers; [ viric vrthra ]; platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b2cbe0fd03f..241ac78976f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14384,6 +14384,9 @@ in tabbed = callPackage ../applications/window-managers/tabbed { enableXft = true; + # if you prefer a custom config, write the config.h in tabbed.config.h + # and enable + # customConfig = builtins.readFile ./tabbed.config.h; }; taffybar = callPackage ../applications/window-managers/taffybar { From 37b5928a81b60df6380b256c86c7223b4d9849ec Mon Sep 17 00:00:00 2001 From: Rahul Gopinath Date: Wed, 29 Jun 2016 12:25:50 -0700 Subject: [PATCH 2/3] tabbed: 20150509 -> 20160425 Xft is now bundled. Hence removing that option --- pkgs/applications/window-managers/tabbed/default.nix | 10 ++++------ pkgs/top-level/all-packages.nix | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/window-managers/tabbed/default.nix b/pkgs/applications/window-managers/tabbed/default.nix index 6fefb219158..80c2a5705a7 100644 --- a/pkgs/applications/window-managers/tabbed/default.nix +++ b/pkgs/applications/window-managers/tabbed/default.nix @@ -3,21 +3,19 @@ with stdenv.lib; stdenv.mkDerivation rec { - name = "tabbed-20150509"; + name = "tabbed-20160425"; src = fetchgit { url = http://git.suckless.org/tabbed; - rev = "55dc32b27b73c121cab18009bf087e95ef3d9c18"; - sha256 = "0c5ayf1lrb1xiz5h8dfd4mh05kas42zzi5m5ylrvl67sfz3z4wg1"; + rev = "bc236142fa72d2f9d6b5c790d3f3a9a9168a7164"; + sha256 = "1fiv57g3jnlhnb6zrzl3n6lnpn2s9s0sd7bcv7r1nb3grwy7icri"; }; - patches = optional enableXft ./xft.patch; - postPatch = stdenv.lib.optionalString (customConfig != null) '' cp ${builtins.toFile "config.h" customConfig} ./config.h ''; - buildInputs = [ xproto libX11 ] ++ optional enableXft libXft; + buildInputs = [ xproto libX11 libXft ]; preInstall = '' export makeFlags="PREFIX=$out" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 241ac78976f..90188ff100e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14383,7 +14383,6 @@ in synergy = callPackage ../applications/misc/synergy { }; tabbed = callPackage ../applications/window-managers/tabbed { - enableXft = true; # if you prefer a custom config, write the config.h in tabbed.config.h # and enable # customConfig = builtins.readFile ./tabbed.config.h; From 2c44e0410c716f174011fae8718d1328f2fa6a66 Mon Sep 17 00:00:00 2001 From: Rahul Gopinath Date: Wed, 29 Jun 2016 12:28:13 -0700 Subject: [PATCH 3/3] tabbed: add patch support Suckless tools encourage patching, along with config.h modification. Allow users to provide their own patches. --- pkgs/applications/window-managers/tabbed/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/window-managers/tabbed/default.nix b/pkgs/applications/window-managers/tabbed/default.nix index 80c2a5705a7..279ba68eae8 100644 --- a/pkgs/applications/window-managers/tabbed/default.nix +++ b/pkgs/applications/window-managers/tabbed/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchgit, xproto, libX11, enableXft, libXft, customConfig ? null }: +{stdenv, fetchgit, xproto, libX11, libXft, customConfig ? null, patches ? [] }: with stdenv.lib; @@ -11,15 +11,17 @@ stdenv.mkDerivation rec { sha256 = "1fiv57g3jnlhnb6zrzl3n6lnpn2s9s0sd7bcv7r1nb3grwy7icri"; }; + inherit patches; + postPatch = stdenv.lib.optionalString (customConfig != null) '' cp ${builtins.toFile "config.h" customConfig} ./config.h ''; buildInputs = [ xproto libX11 libXft ]; - preInstall = '' - export makeFlags="PREFIX=$out" - ''; + makeFlags = [ + "PREFIX=$(out)" + ]; meta = { homepage = http://tools.suckless.org/tabbed;