@@ -14,6 +14,7 @@ postProcess deriv@(MkDerivation {..})
1414 = deriv { buildTools = "perl":buildTools }
1515 | pname == "alex" && version >= Version [3,1] []
1616 = deriv { buildTools = "perl":"happy":buildTools }
17+ | pname == "bindings-GLFW" = deriv { extraLibs = "libXext":"libXfixes":extraLibs }
1718 | pname == "cabal2nix" = deriv { doCheck = True, phaseOverrides = cabal2nixDoCheckHook }
1819 | pname == "cabal-install" && version >= Version [0,14] []
1920 = deriv { phaseOverrides = cabalInstallPostInstall }
@@ -36,19 +37,27 @@ postProcess deriv@(MkDerivation {..})
3637 | pname == "gloss-raster" = deriv { extraLibs = "llvm":extraLibs }
3738 | pname == "GLUT" = deriv { extraLibs = "glut":"libSM":"libICE":"libXmu":"libXi":"mesa":extraLibs }
3839 | pname == "gtk" = deriv { extraLibs = "pkgconfig":"libc":extraLibs, buildDepends = delete "gio" buildDepends }
40+ | pname == "gtkglext" = deriv { pkgConfDeps = "pangox_compat":pkgConfDeps }
41+ | pname == "gtk2hs-buildtools"= deriv { buildDepends = "hashtables":buildDepends }
3942 | pname == "gtksourceview2" = deriv { extraLibs = "pkgconfig":"libc":extraLibs }
40− | pname == "haddock" = deriv { buildTools = "alex":"happy":buildTools }
43+ | pname == "haddock" && version < Version [2,14] []
44+ = deriv { buildTools = "alex":"happy":buildTools }
4145 | pname == "happy" = deriv { buildTools = "perl":buildTools }
4246 | pname == "haskeline" = deriv { buildDepends = "utf8String":buildDepends }
4347 | pname == "haskell-src" = deriv { buildTools = "happy":buildTools }
4448 | pname == "haskell-src-meta" = deriv { buildDepends = "uniplate":buildDepends }
4549 | pname == "hflags" = deriv { metaSection = metaSection { license = Unknown (Just "Apache-2.0") } }
50+ | pname == "hfsevents" = deriv { buildTools = "gccApple":buildTools, phaseOverrides = "configureFlags = \"--ghc-option=-pgmc=${gccApple}/bin/gcc\";" }
4651 | pname == "HFuse" = deriv { phaseOverrides = hfusePreConfigure }
4752 | pname == "highlighting-kate"= highlightingKatePostProcessing deriv
53+ | pname == "hlibgit2" = deriv { testDepends = "git":testDepends }
4854 | pname == "HList" = deriv { buildTools = "diffutils":buildTools }
4955 | pname == "hmatrix" = deriv { extraLibs = "gsl":"liblapack":"blas":extraLibs }
5056 | pname == "hoogle" = deriv { testTarget = "--test-option=--no-net" }
5157 | pname == "hspec" = deriv { doCheck = False }
58+ | pname == "HTTP" && version >= Version [4000,2,14] []
59+ = deriv { runHaddock = True, phaseOverrides = httpNoHaddock }
60+ | pname == "GlomeVec" = deriv { buildTools = "llvm":buildTools }
5261 | pname == "idris" = deriv { buildTools = "happy":buildTools, extraLibs = "gmp":"boehmgc":extraLibs }
5362 | pname == "language-c-quote" = deriv { buildTools = "alex":"happy":buildTools }
5463 | pname == "language-java" = deriv { buildDepends = "syb":buildDepends }
@@ -58,6 +67,7 @@ postProcess deriv@(MkDerivation {..})
5867 | pname == "llvm-base" = deriv { extraLibs = "llvm":extraLibs }
5968 | pname == "llvm-general" = deriv { doCheck = False }
6069 | pname == "llvm-general-pure"= deriv { doCheck = False }
70+ | pname == "MFlow" = deriv { buildTools = "cpphs":buildTools }
6171 | pname == "markdown-unlit" = deriv { runHaddock = True, phaseOverrides = markdownUnlitNoHaddock }
6272 | pname == "multiarg" = deriv { buildDepends = "utf8String":buildDepends }
6373 | pname == "mime-mail" = deriv { extraFunctionArgs = ["sendmail ? \"sendmail\""], phaseOverrides = mimeMailConfigureFlags }
@@ -70,17 +80,27 @@ postProcess deriv@(MkDerivation {..})
7080 | pname == "pcap" = deriv { extraLibs = "libpcap":extraLibs }
7181 | pname == "persistent" = deriv { extraLibs = "sqlite3":extraLibs }
7282 | pname == "poppler" = deriv { extraLibs = "libc":extraLibs }
83+ | pname == "QuickCheck" && version >= Version [2,7,3] []
84+ = deriv { runHaddock = True, phaseOverrides = quickCheckNoHaddock }
7385 | pname == "repa-algorithms" = deriv { extraLibs = "llvm":extraLibs }
7486 | pname == "repa-examples" = deriv { extraLibs = "llvm":extraLibs }
7587 | pname == "SDL-image" = deriv { extraLibs = "SDL_image":extraLibs }
7688 | pname == "SDL-mixer" = deriv { extraLibs = "SDL_mixer":extraLibs }
7789 | pname == "SDL-ttf" = deriv { extraLibs = "SDL_ttf":extraLibs }
7890 | pname == "sloane" = deriv { phaseOverrides = sloanePostInstall }
91+ | pname == "split" && version == Version [0,2,2] []
92+ = deriv { doCheck = True, phaseOverrides = splitDoCheck }
7993 | pname == "structured-haskell-mode" = deriv { buildTools = "emacs":buildTools, phaseOverrides = structuredHaskellModePostInstall }
8094 | pname == "svgcairo" = deriv { extraLibs = "libc":extraLibs }
95+ | pname == "syb" && version == Version [0,4,2] []
96+ = deriv { doCheck = True, phaseOverrides = sybDoCheck }
97+ | pname == "tar" = deriv { runHaddock = True, phaseOverrides = tarNoHaddock }
8198 | pname == "terminfo" = deriv { extraLibs = "ncurses":extraLibs }
99+ | pname == "text-icu" = deriv { doCheck = True, phaseOverrides = textIcuDoCheckHook }
82100 | pname == "threadscope" = deriv { configureFlags = "--ghc-options=-rtsopts":configureFlags }
83− | pname == "unix-time" = deriv { phaseOverrides = unixTimeConfigureFlags }
101+ | pname == "transformers" && version >= Version [0,4,1] []
102+ = deriv { runHaddock = True, phaseOverrides = transformersNoHaddock }
103+ | pname == "tz" = deriv { extraFunctionArgs = ["pkgs_tzdata"], phaseOverrides = "preConfigure = \"export TZDIR=${pkgs_tzdata}/share/zoneinfo\";" }
84104 | pname == "vacuum" = deriv { extraLibs = "ghcPaths":extraLibs }
85105 | pname == "wxc" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs, phaseOverrides = wxcPostInstall }
86106 | pname == "wxcore" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }
@@ -122,7 +142,8 @@ cudaConfigurePhase = unlines
122142
123143ghcModPostInstall :: String
124144ghcModPostInstall = unlines
125− [ "postInstall = ''"
145+ [ "configureFlags = \"--datasubdir=${self.pname}-${self.version}\";"
146+ , "postInstall = ''"
126147 , " cd $out/share/$pname-$version"
127148 , " make"
128149 , " rm Makefile"
@@ -165,7 +186,7 @@ darcsInstallPostInstall = unlines
165186
166187highlightingKatePostProcessing :: Derivation -> Derivation
167188highlightingKatePostProcessing deriv@(MkDerivation {..}) = deriv
168− { phaseOverrides = "prePatch = \"sed -i -e 's|regex-pcre-builtin|regex-pcre|' highlighting-kate.cabal\";"
189+ { phaseOverrides = "prePatch = \"sed -i -e 's|regex-pcre-builtin >= .*|regex-pcre|' highlighting-kate.cabal\";"
169190 , buildDepends = "regex-pcre" : filter (/="regex-pcre-builtin") buildDepends
170191 }
171192
@@ -176,6 +197,10 @@ xmonadPostInstall = unlines
176197 , " mkdir -p $out/share/man/man1"
177198 , " mv \"$out/\"**\"/man/\"*.1 $out/share/man/man1/"
178199 , "'';"
200+ , "patches = ["
201+ , " # Patch to make xmonad use XMONAD_{GHC,XMESSAGE} (if available)."
202+ , " ./xmonad_ghc_var_0.11.patch"
203+ , "];"
179204 ]
180205
181206gitAnnexOverrides :: String
@@ -204,11 +229,6 @@ hfusePreConfigure :: String
204229hfusePreConfigure = unlines
205230 [ "preConfigure = ''"
206231 , " sed -i -e \"s@ Extra-Lib-Dirs: /usr/local/lib@ Extra-Lib-Dirs: ${fuse}/lib@\" HFuse.cabal"
207− , " sed -i -e \"s/LANGUAGE FlexibleContexts/LANGUAGE FlexibleContexts, RankNTypes/\" System/Fuse.hsc"
208− , " sed -i -e \"s/E(Exception/E(catch, Exception, IOException/\" System/Fuse.hsc"
209− , " sed -i -e \"s/IO(catch,/IO(/\" System/Fuse.hsc"
210− , " sed -i -e \"s/IO.catch/ E.catch/\" System/Fuse.hsc"
211− , " sed -i -e \"s/const exitFailure/\\\\\\\\(_ :: IOException) -> exitFailure/\" System/Fuse.hsc"
212232 , "'';"
213233 ]
214234
@@ -234,12 +254,22 @@ doctestNoHaddock = markdownUnlitNoHaddock
234254cabal2nixDoCheckHook :: String
235255cabal2nixDoCheckHook = "doCheck = self.stdenv.lib.versionOlder \"7.6\" self.ghc.version;"
236256
257+textIcuDoCheckHook :: String
258+textIcuDoCheckHook = "doCheck = !self.stdenv.isDarwin;"
259+
237260eitherNoHaddock :: String
238261eitherNoHaddock = "noHaddock = self.stdenv.lib.versionOlder self.ghc.version \"7.6\";"
239262
263+httpNoHaddock, quickCheckNoHaddock, tarNoHaddock, transformersNoHaddock :: String
264+httpNoHaddock = "noHaddock = self.stdenv.lib.versionOlder self.ghc.version \"6.11\";"
265+quickCheckNoHaddock = httpNoHaddock
266+tarNoHaddock = httpNoHaddock
267+transformersNoHaddock = httpNoHaddock
268+
240269agdaPostInstall :: String
241270agdaPostInstall = unlines
242271 [ "postInstall = ''"
272+ , " $out/bin/agda -c --no-main $out/share/Agda-*/lib/prim/Agda/Primitive.agda"
243273 , " $out/bin/agda-mode compile"
244274 , "'';"
245275 ]
@@ -253,10 +283,6 @@ structuredHaskellModePostInstall = unlines
253283 , "'';"
254284 ]
255285
256−unixTimeConfigureFlags :: String
257−unixTimeConfigureFlags =
258− "configureFlags = self.stdenv.lib.optionalString self.enableSharedLibraries \"--ghc-option=-fPIC\";"
259−
260286sloanePostInstall :: String
261287sloanePostInstall = unlines
262288 [ "postInstall = ''"
@@ -269,3 +295,7 @@ mimeMailConfigureFlags :: String
269295mimeMailConfigureFlags = unlines
270296 [ "configureFlags = \"--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\\\"${sendmail}\\\"\";"
271297 ]
298+
299+sybDoCheck, splitDoCheck :: String
300+sybDoCheck = "doCheck = self.stdenv.lib.versionOlder self.ghc.version \"7.9\";"
301+splitDoCheck = sybDoCheck