[Nix-dev] [PATCH] Enable freetype support in xmobar using PostProcess.hs, Flags.hs

Александр Цамутали astsmtl at yandex.ru
Mon Sep 19 01:13:38 CEST 2011


 src/Cabal2Nix/Flags.hs       |    1 +
 src/Cabal2Nix/PostProcess.hs |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/Cabal2Nix/Flags.hs b/src/Cabal2Nix/Flags.hs
index 6677e73..7ef9c47 100644
--- a/src/Cabal2Nix/Flags.hs
+++ b/src/Cabal2Nix/Flags.hs
@@ -9,6 +9,7 @@ pkgConfigureFlags (PackageIdentifier (PackageName name) _)
  | name == "threadscope"        = ([], ["--ghc-options=-rtsopts"])
  | name == "X11-xft"            = ([], ["--extra-include-dirs=${freetype}/include/freetype2"])
  | name == "xmonad-extras"      = ([disable "with_hlist", disable "with_mpd"], [])
+ | name == "xmobar"             = ([], ["--flags=with_xft"])
  | otherwise                    = ([],[])
 
 enable :: String -> (FlagName,Bool)
diff --git a/src/Cabal2Nix/PostProcess.hs b/src/Cabal2Nix/PostProcess.hs
index 618a7e3..88ed910 100644
--- a/src/Cabal2Nix/PostProcess.hs
+++ b/src/Cabal2Nix/PostProcess.hs
@@ -34,4 +34,5 @@ postProcess deriv@(MkDerivation {..})
   | pname == "wxcore"           = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }
   | pname == "X11"              = deriv { extraLibs = "libXinerama":"libXext":extraLibs }
   | pname == "X11-xft"          = deriv { extraLibs = "pkgconfig":"freetype":"fontconfig":extraLibs }
+  | pname == "xmobar"           = deriv { buildDepends = "X11Xft":buildDepends }
   | otherwise                   = deriv


-- 
Александр Цамутали



More information about the nix-dev mailing list