diff options
author | romildo <malaquias@gmail.com> | 2017-06-09 17:57:39 -0300 |
---|---|---|
committer | romildo <malaquias@gmail.com> | 2017-06-09 18:05:09 -0300 |
commit | 11623c5fca98788ba0158e67a55f256d1832714f (patch) | |
tree | f7d52d5ca4cc6c4d01964b26910245926bd404fa /pkgs/desktops | |
parent | 57091a19e2aa1a0e11fd91d95cefa7d42fbf95e0 (diff) | |
download | nixlib-11623c5fca98788ba0158e67a55f256d1832714f.tar nixlib-11623c5fca98788ba0158e67a55f256d1832714f.tar.gz nixlib-11623c5fca98788ba0158e67a55f256d1832714f.tar.bz2 nixlib-11623c5fca98788ba0158e67a55f256d1832714f.tar.lz nixlib-11623c5fca98788ba0158e67a55f256d1832714f.tar.xz nixlib-11623c5fca98788ba0158e67a55f256d1832714f.tar.zst nixlib-11623c5fca98788ba0158e67a55f256d1832714f.zip |
lxappearance: add variant for Gtk+-3
lxappearance supports both Gtk+-2 and Gtk+-3. The current `lxappearance' package continues to be for Gtk+-2. Add `lxappearance-gtk3' for Gtk+-3. A patch is needed in order to look for themes in system data dirs with Gtk+-3.
Diffstat (limited to 'pkgs/desktops')
-rw-r--r-- | pkgs/desktops/lxde/core/lxappearance/default.nix | 8 | ||||
-rw-r--r-- | pkgs/desktops/lxde/core/lxappearance/lxappearance-0.6.3-xdg.system.data.dirs.patch | 27 |
2 files changed, 33 insertions, 2 deletions
diff --git a/pkgs/desktops/lxde/core/lxappearance/default.nix b/pkgs/desktops/lxde/core/lxappearance/default.nix index b6b63e316152..9793ff9c2502 100644 --- a/pkgs/desktops/lxde/core/lxappearance/default.nix +++ b/pkgs/desktops/lxde/core/lxappearance/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, intltool, pkgconfig, libX11, gtk2 }: +{ stdenv, fetchurl, intltool, pkgconfig, libX11, gtk2, withGtk3 ? false, gtk3 }: stdenv.mkDerivation rec { name = "lxappearance-0.6.3"; @@ -10,7 +10,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool ]; - buildInputs = [ libX11 gtk2 ]; + buildInputs = [ libX11 (if withGtk3 then gtk3 else gtk2) ]; + + patches = [ ./lxappearance-0.6.3-xdg.system.data.dirs.patch ]; + + configureFlags = stdenv.lib.optional withGtk3 "--enable-gtk3"; meta = { description = "A lightweight program for configuring the theme and fonts of gtk applications"; diff --git a/pkgs/desktops/lxde/core/lxappearance/lxappearance-0.6.3-xdg.system.data.dirs.patch b/pkgs/desktops/lxde/core/lxappearance/lxappearance-0.6.3-xdg.system.data.dirs.patch new file mode 100644 index 000000000000..a63882aa2a7a --- /dev/null +++ b/pkgs/desktops/lxde/core/lxappearance/lxappearance-0.6.3-xdg.system.data.dirs.patch @@ -0,0 +1,27 @@ +--- lxappearance-0.6.3/src/widget-theme.c.orig 2016-02-20 20:48:38.000000000 -0200 ++++ lxappearance-0.6.3/src/widget-theme.c 2017-06-09 17:37:53.369555085 -0300 +@@ -66,6 +66,7 @@ + static void load_themes() + { + char* dir; ++ const gchar * const * dirs; + GSList* themes = NULL, *l; + GtkTreeIter sel_it = {0}; + GtkTreeSelection* tree_sel; +@@ -85,6 +86,16 @@ + themes = load_themes_in_dir(dir, themes); + g_free(dir); + ++ /* load from sharedata theme dirs */ ++ dirs = g_get_system_data_dirs(); ++ while (*dirs != NULL) ++ { ++ dir = g_build_filename(*dirs, "themes", NULL); ++ themes = load_themes_in_dir(dir, themes); ++ g_free(dir); ++ dirs++; ++ } ++ + themes = g_slist_sort(themes, (GCompareFunc)strcmp); + for(l = themes; l; l=l->next) + { |