From ff4c0be475fc390fa67c1586101efa281f61bd13 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 18 Mar 2016 22:27:03 +0100 Subject: machines/katara: myPkgs improvements python runtime dependencies a new patch for taffybar --- machines/profpatsch/pkgs.nix | 10 +++++--- machines/profpatsch/taffybar-color.patch | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 machines/profpatsch/taffybar-color.patch (limited to 'machines') diff --git a/machines/profpatsch/pkgs.nix b/machines/profpatsch/pkgs.nix index b79d5c4e..af4b8528 100644 --- a/machines/profpatsch/pkgs.nix +++ b/machines/profpatsch/pkgs.nix @@ -1,15 +1,16 @@ { pkgs, lib }: let - addRuntimeDeps = drv: ds: drv.overrideDerivation (old: { - propagatedNativeBuildInputs = old.propagatedNativeBuildInputs ++ ds; + + addPythonRuntimeDeps = drv: deps: drv.overrideDerivation (old: { + propagatedNativeBuildInputs = old.propagatedNativeBuildInputs ++ deps; }); in with pkgs; { - offlineimap = addRuntimeDeps offlineimap [ pythonPackages.pygpgme ]; + offlineimap = addPythonRuntimeDeps offlineimap [ pythonPackages.pygpgme ]; taffybar = taffybar.override { ghcWithPackages = (haskellPackages.override { @@ -17,6 +18,9 @@ with pkgs; taffybar = super.taffybar.overrideDerivation (old: { name = old.name + "foo"; patches = (old.patches or []) ++ [ ./taffybar.patch ]; + postPatch = old.postPathPhase or "" + '' + patch -R ${./taffybar-color.patch} + ''; }); }; }).ghcWithPackages; diff --git a/machines/profpatsch/taffybar-color.patch b/machines/profpatsch/taffybar-color.patch new file mode 100644 index 00000000..cfa1cce8 --- /dev/null +++ b/machines/profpatsch/taffybar-color.patch @@ -0,0 +1,40 @@ +From 45ff40992c8fe5593d5f3e03ef0765168c6325fb Mon Sep 17 00:00:00 2001 +From: Peder Stray +Date: Thu, 29 Oct 2015 17:37:56 +0100 +Subject: [PATCH] Load taffybar gtk configs after initGUI + +Since gtkrc files from themes seem to load anyway, load the default and +user gtkrc for taffybar after initGUI. please note that setting +gtk_color_scheme from any of these causes a lot of already loaded gtkrc +files to be reloaded. +--- + src/System/Taffybar.hs | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/src/System/Taffybar.hs b/src/System/Taffybar.hs +index f119852..f7afe5e 100644 +--- a/src/System/Taffybar.hs ++++ b/src/System/Taffybar.hs +@@ -261,16 +261,15 @@ setTaffybarSize cfg window = do + + taffybarMain :: TaffybarConfig -> IO () + taffybarMain cfg = do +- -- Override the default GTK theme path settings. This causes the +- -- bar (by design) to ignore the real GTK theme and just use the +- -- provided minimal theme to set the background and text colors. +- -- Users can override this default. +- defaultGtkConfig <- getDefaultConfigFile "taffybar.rc" +- userGtkConfig <- getUserConfigFile "taffybar" "taffybar.rc" +- rcSetDefaultFiles [ defaultGtkConfig, userGtkConfig ] + + _ <- initGUI + ++ -- Load default and user gtk resources ++ defaultGtkConfig <- getDefaultConfigFile "taffybar.rc" ++ userGtkConfig <- getUserConfigFile "taffybar" "taffybar.rc" ++ rcParse defaultGtkConfig ++ rcParse userGtkConfig ++ + Just disp <- displayGetDefault + nscreens <- displayGetNScreens disp + screen <- case screenNumber cfg < nscreens of -- cgit 1.4.1