@@ -1,19 +1,14 @@
11{-# LANGUAGE OverloadedStrings #-}
2−{-# LANGUAGE ScopedTypeVariables #-}
32
43module Distribution.Nixpkgs.Haskell.FromCabal.PostProcess ( postProcess, pkg ) where
54
65import Control.Lens
7−import Control.Monad.Trans.State
86import Data.List.Split
9−import Data.Map ( Map )
10−import qualified Data.Map as Map
11−import Data.Map.Lens
127import Data.Set ( Set )
138import qualified Data.Set as Set
9+import Data.Set.Lens
1410import Distribution.Nixpkgs.Haskell
1511import Distribution.Nixpkgs.Meta
16−import Distribution.Nixpkgs.License
1712import Distribution.Package
1813import Distribution.System
1914import Distribution.Text
@@ -21,11 +16,7 @@ import Distribution.Version
2116import Language.Nix
2217
2318postProcess :: Derivation -> Derivation
24−postProcess deriv =
25− foldr (.) id [ f | (Dependency n vr _, f) <- hooks, packageName deriv == n, packageVersion deriv `withinRange` vr ]
26− . fixGtkBuilds
27− . fixBuildDependsForTools
28− $ deriv
19+postProcess deriv = foldr ($) (fixGtkBuilds deriv) [ f | (Dependency n vr, f) <- hooks, packageName deriv == n, packageVersion deriv `withinRange` vr ]
2920
3021fixGtkBuilds :: Derivation -> Derivation
3122fixGtkBuilds drv = drv & dependencies . pkgconfig %~ Set.filter (not . collidesWithHaskellName)
@@ -33,93 +24,53 @@ fixGtkBuilds drv = drv & dependencies . pkgconfig %~ Set.filter (not . collidesW
3324 & dependencies . tool %~ Set.filter (not . collidesWithHaskellName)
3425 where
3526 collidesWithHaskellName :: Binding -> Bool
36− collidesWithHaskellName b = case buildDeps Map.!? view localName b of
37− Nothing -> False -- totally uncollided
38− Just p -> p /= view reference b -- identical is not collision, and important to preserve for cross
27+ collidesWithHaskellName b = view localName b `Set.member` buildDeps
3928
4029 myName :: Identifier
4130 myName = ident # unPackageName (packageName drv)
4231
43− buildDeps :: Map Identifier Path
44− buildDeps = Map.delete myName (toMapOf (dependencies . haskell . to Set.toList . traverse . binding . ifolded) drv)
45−
46−-- Per https://github.com/haskell/cabal/issues/5412 hvr considers
47−-- `build-depends` providing executables an accident, and fragile one at that,
48−-- unworthy of any compatibility hacks. But while he and the other Hackage
49−-- maintainers is dedicated to fixing executables and libraries on Hackage, test
50−-- suites and benchmarks are not a priority, as it is trivial to skip building
51−-- test-suites with cabal-install. Nix however wishes to build test suites much
52−-- more widely, so skipping those components is not an option.
53−--
54−-- Between that, and Stack not changing behavior as of
55−-- https://github.com/commercialhaskell/stack/pull/4132, it seems likely that
56−-- for a while packages scraped from Hackage will continue to improperly use
57−-- `build-depends: package-for-tool` instead of `build-tool-depends` (which does
58−-- also work for Stack). Until that changes, we provide do this to work around
59−-- those package's brokenness.
60−fixBuildDependsForTools :: Derivation -> Derivation
61−fixBuildDependsForTools = foldr (.) id
62− [ fmap snd $ runState $ do
63− needs <- use $ cloneLens c . haskell . contains p
64− cloneLens c . tool . contains p ||= needs
65− | (c :: ALens' Derivation BuildInfo) <- [ testDepends, benchmarkDepends ]
66− , p <- self <$> [ "hspec-discover"
67− , "tasty-discover"
68− , "hsx2hs"
69− , "markdown-unlit"
70− ]
71− ]
32+ buildDeps :: Set Identifier
33+ buildDeps = Set.delete myName (setOf (dependencies . haskell . folded . localName) drv)
7234
7335hooks :: [(Dependency, Derivation -> Derivation)]
7436hooks =
7537 [ ("Agda < 2.5", set (executableDepends . tool . contains (pkg "emacs")) True . set phaseOverrides agdaPostInstall)
7638 , ("Agda >= 2.5", set (executableDepends . tool . contains (pkg "emacs")) True . set phaseOverrides agda25PostInstall)
7739 , ("alex < 3.1.5", set (testDepends . tool . contains (pkg "perl")) True)
78− , ("alex", set (executableDepends . tool . contains (self "happy")) True)
79− , ("alsa-core", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux)))
40+ , ("alex", set (executableDepends . tool . contains (bind "self.happy")) True)
41+ , ("alsa-core", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux))) , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
8042 , ("bindings-GLFW", over (libraryDepends . system) (Set.union (Set.fromList [bind "pkgs.xorg.libXext", bind "pkgs.xorg.libXfixes"])))
81− , ("bindings-lxc", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux)))
82− , ("bustle", bustleOverrides)
83− , ("Cabal", set doCheck False) -- test suite doesn't work in Nix
84− , ("Cabal >2.2", over (setupDepends . haskell) (Set.union (Set.fromList [self "mtl", self "parsec"]))) -- https://github.com/haskell/cabal/issues/5391
43+ , ("bindings-lxc", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux))) , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
44+ , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
8545 , ("cabal-helper", set doCheck False) -- https://github.com/DanielG/cabal-helper/issues/17
8646 , ("cabal-install", set doCheck False . set phaseOverrides cabalInstallPostInstall)
87− , ("cabal2nix > 2", cabal2nixOverrides)
47+ , ("Cabal", set doCheck False) -- test suite doesn't work in Nix
8848 , ("darcs", set phaseOverrides darcsInstallPostInstall . set doCheck False)
8949 , ("dbus", set doCheck False) -- don't execute tests that try to access the network
9050 , ("dns", set testTarget "spec") -- don't execute tests that try to access the network
9151 , ("eventstore", over (metaSection . platforms) (Set.filter (\(Platform arch _) -> arch == X86_64)))
9252 , ("freenect < 1.2.1", over configureFlags (Set.union (Set.fromList ["--extra-include-dirs=${pkgs.freenect}/include/libfreenect", "--extra-lib-dirs=${pkgs.freenect}/lib"])))
93− , ("fltkhs", set (libraryDepends . system . contains (pkg "fltk14")) True . over (libraryDepends . pkgconfig) (Set.union (pkgs ["libGLU", "libGL"]))) -- TODO: fltk14 belongs into the *setup* dependencies.
9453 , ("gf", set phaseOverrides gfPhaseOverrides . set doCheck False)
9554 , ("gi-cairo", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
96− , ("gi-gdk", set runHaddock True )
97− , ("gi-gio", set runHaddock True )
98− , ("gi-glib", set runHaddock True )
99− , ("gi-gst", giGstLibOverrides "gstreamer") -- https://github.com/haskell-gi/haskell-gi/issues/36
10055 , ("gi-gstaudio", giGstLibOverrides "gst-plugins-base") -- https://github.com/haskell-gi/haskell-gi/issues/36
10156 , ("gi-gstbase", giGstLibOverrides "gst-plugins-base") -- https://github.com/haskell-gi/haskell-gi/issues/36
57+ , ("gi-gst", giGstLibOverrides "gstreamer") -- https://github.com/haskell-gi/haskell-gi/issues/36
10258 , ("gi-gstvideo", giGstLibOverrides "gst-plugins-base") -- https://github.com/haskell-gi/haskell-gi/issues/36
103− , ("gi-gtk", set runHaddock True )
10459 , ("gi-javascriptcore < 4.0.0.0", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
105− , ("gi-pango", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
106− , ("gi-pango", set runHaddock True )
107− , ("gi-pangocairo", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
108− , ("gi-vte", set runHaddock True )
109− , ("gi-webkit", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
11060 , ("gio", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
111− , ("git", set doCheck False) -- https://github.com/vincenthz/hit/issues/33
112− , ("git-annex >= 6.20170925 && < 6.20171214", set doCheck False) -- some versions of git-annex require their test suite to be run inside of a git checkout
61+ , ("gi-pangocairo", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
62+ , ("gi-pango", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
11363 , ("git-annex", gitAnnexHook)
64+ , ("git-annex >= 6.20170925 && < 6.20171214", set doCheck False) -- some versions of git-annex require their test suite to be run inside of a git checkout
11465 , ("github-backup", set (executableDepends . tool . contains (pkg "git")) True)
115− , ("GLFW", over (libraryDepends . system) (Set.union (Set.fromList [bind "pkgs.xorg.libXext", bind "pkgs.xorg.libXfixes"])))
66+ , ("git", set doCheck False) -- https://github.com/vincenthz/hit/issues/33
67+ , ("gi-webkit", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
11668 , ("GlomeVec", set (libraryDepends . pkgconfig . contains (bind "self.llvmPackages.llvm")) True)
117− , ("graphviz", set (testDepends . system . contains (pkg "graphviz")) True)
11869 , ("gtk3", gtk3Hook)
119− , ("gtkglext", gtkglextHook)
12070 , ("haddock", haddockHook) -- https://github.com/haskell/haddock/issues/511
12171 , ("hakyll", set (testDepends . tool . contains (pkg "utillinux")) True) -- test suite depends on "rev"
12272 , ("haskell-src-exts", set doCheck False)
73+ , ("hspec-core >= 2.4.4", hspecCoreOverrides)
12374 , ("hfsevents", hfseventsOverrides)
12475 , ("HFuse", set phaseOverrides hfusePreConfigure)
12576 , ("hlibgit2 >= 0.18.0.14", set (testDepends . tool . contains (pkg "git")) True)
@@ -127,34 +78,30 @@ hooks =
12778 , ("holy-project", set doCheck False) -- attempts to access the network
12879 , ("hoogle", set testTarget "--test-option=--no-net")
12980 , ("hsignal < 0.2.7.4", set phaseOverrides "prePatch = \"rm -v Setup.lhs\";") -- https://github.com/amcphail/hsignal/issues/1
130− , ("hslua < 0.9.3", over (libraryDepends . system) (replace (pkg "lua") (pkg "lua5_1")))
131− , ("hslua >= 0.9.3", over (libraryDepends . system) (replace (pkg "lua") (pkg "lua5_3")))
132− , ("hspec-core >= 2.4.4", hspecCoreOverrides)
133− , ("http-client", set doCheck False) -- attempts to access the network
81+ , ("hslua < 0.9.3", over (libraryDepends . each) (replace (pkg "lua") (pkg "lua5_1")))
82+ , ("hslua >= 0.9.3", over (libraryDepends . each) (replace (pkg "lua") (pkg "lua5_3")))
13483 , ("http-client-openssl >= 0.2.0.1", set doCheck False) -- attempts to access the network
84+ , ("http-client", set doCheck False) -- attempts to access the network
13585 , ("http-client-tls >= 0.2.2", set doCheck False) -- attempts to access the network
13686 , ("http-conduit", set doCheck False) -- attempts to access the network
13787 , ("imagemagick", set (libraryDepends . pkgconfig . contains (pkg "imagemagick")) True) -- https://github.com/NixOS/cabal2nix/issues/136
138− , ("include-file <= 0.1.0.2", set (libraryDepends . haskell . contains (self "random")) True) -- https://github.com/Daniel-Diaz/include-file/issues/1
88+ , ("include-file <= 0.1.0.2", set (libraryDepends . haskell . contains (bind "self.random")) True) -- https://github.com/Daniel-Diaz/include-file/issues/1
13989 , ("js-jquery", set doCheck False) -- attempts to access the network
14090 , ("libconfig", over (libraryDepends . system) (replace "config = null" (pkg "libconfig")))
14191 , ("libxml", set (configureFlags . contains "--extra-include-dir=${libxml2.dev}/include/libxml2") True)
14292 , ("liquid-fixpoint", set (executableDepends . system . contains (pkg "ocaml")) True . set (testDepends . system . contains (pkg "z3")) True . set (testDepends . system . contains (pkg "nettools")) True . set (testDepends . system . contains (pkg "git")) True . set doCheck False)
14393 , ("liquidhaskell", set (testDepends . system . contains (pkg "z3")) True)
144− , ("lzma-clib", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)) . set (libraryDepends . haskell . contains (self "only-buildable-on-windows")) False)
145− , ("MFlow < 4.6", set (libraryDepends . tool . contains (self "cpphs")) True)
94+ , ("lzma-clib", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)) . set (libraryDepends . haskell . contains (bind "self.only-buildable-on-windows")) False)
95+ , ("MFlow < 4.6", set (libraryDepends . tool . contains (bind "self.cpphs")) True)
14696 , ("mwc-random", set doCheck False)
14797 , ("mysql", set (libraryDepends . system . contains (pkg "mysql")) True)
14898 , ("network-attoparsec", set doCheck False) -- test suite requires network access
14999 , ("numeric-qq", set doCheck False) -- test suite doesn't finish even after 1+ days
150100 , ("opencv", opencvOverrides)
151− , ("pandoc >= 1.16.0.2 && < 2.5", set doCheck False) -- https://github.com/jgm/pandoc/issues/2709 and https://github.com/fpco/stackage/issues/1332
152− , ("pandoc < 2.6", pandocPre26Overrides)
153− , ("pandoc >= 2.6", pandocOverrides)
154− , ("pandoc-citeproc", set doCheck False) -- https://github.com/jgm/pandoc-citeproc/issues/369
101+ , ("pandoc >= 1.16.0.2", set doCheck False) -- https://github.com/jgm/pandoc/issues/2709 and https://github.com/fpco/stackage/issues/1332
102+ , ("pandoc-citeproc", set doCheck False) -- https://github.com/jgm/pandoc-citeproc/issues/172
103+ , ("pandoc", set jailbreak False) -- jailbreak-cabal break the build
155104 , ("purescript", set doCheck False) -- test suite doesn't cope with Nix build env
156− , ("proto-lens-protobuf-types", set (libraryDepends . tool . contains (pkg "protobuf")) True)
157− , ("proto-lens-protoc", set (libraryDepends . tool . contains (pkg "protobuf")) True)
158105 , ("qtah-cpp-qt5", set (libraryDepends . system . contains (bind "pkgs.qt5.qtbase")) True)
159106 , ("qtah-qt5", set (libraryDepends . tool . contains (bind "pkgs.qt5.qtbase")) True)
160107 , ("readline", over (libraryDepends . system) (Set.union (pkgs ["readline", "ncurses"])))
@@ -168,31 +115,26 @@ hooks =
168115 , ("target", set (testDepends . system . contains (pkg "z3")) True)
169116 , ("terminfo", set (libraryDepends . system . contains (pkg "ncurses")) True)
170117 , ("text", set doCheck False) -- break infinite recursion
171− , ("tensorflow-proto", set (libraryDepends . tool . contains (pkg "protobuf")) True)
172− , ("thyme", set (libraryDepends . tool . contains (self "cpphs")) True) -- required on Darwin
118+ , ("thyme", set (libraryDepends . tool . contains (bind "self.cpphs")) True) -- required on Darwin
173119 , ("twilio", set doCheck False) -- attempts to access the network
174120 , ("tz", set phaseOverrides "preConfigure = \"export TZDIR=${pkgs.tzdata}/share/zoneinfo\";")
175− , ("udev", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux)))
176− , ("webkitgtk3", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
121+ , ("udev", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux))) , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
177122 , ("webkitgtk3-javascriptcore", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
123+ , ("webkitgtk3", webkitgtk24xHook) -- https://github.com/haskell-gi/haskell-gi/issues/36
178124 , ("websockets", set doCheck False) -- https://github.com/jaspervdj/websockets/issues/104
179125 , ("Win32", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)))
180126 , ("Win32-shortcut", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)))
181− , ("wxc", wxcHook)
182127 , ("wxcore", set (libraryDepends . pkgconfig . contains (pkg "wxGTK")) True)
128+ , ("wxc", wxcHook)
183129 , ("X11", over (libraryDepends . system) (Set.union (Set.fromList $ map bind ["pkgs.xorg.libXinerama","pkgs.xorg.libXext","pkgs.xorg.libXrender","pkgs.xorg.libXScrnSaver"])))
184− , ("xmonad >= 0.14.2", set phaseOverrides xmonadPostInstall)
185− , ("zip-archive < 0.3.1", over (testDepends . tool) (replace (self "zip") (pkg "zip")))
130+ , ("xmonad", set phaseOverrides xmonadPostInstall)
131+ , ("zip-archive < 0.3.1", over (testDepends . tool) (replace (bind "self.zip") (pkg "zip")))
186132 , ("zip-archive >= 0.3.1 && < 0.3.2.3", over (testDepends . tool) (Set.union (Set.fromList [pkg "zip", pkg "unzip"]))) -- https://github.com/jgm/zip-archive/issues/35
187− , ("zip-archive >= 0.4", set (testDepends . tool . contains (pkg "which")) True)
188133 ]
189134
190135pkg :: Identifier -> Binding
191136pkg i = binding # (i, path # ["pkgs",i])
192137
193−self :: Identifier -> Binding
194−self i = binding # (i, path # ["self",i])
195−
196138pkgs :: [Identifier] -> Set Binding
197139pkgs = Set.fromList . map pkg
198140
@@ -202,18 +144,10 @@ bind s = binding # (i, path # is)
202144 is = map (review ident) (splitOn "." s)
203145 i = last is
204146
205−-- | @replace old new bset@ replaces the Nix binding @old@ with @new@ in the
206−-- set of bindings @bset@. If @old@ is not found in @bset@, then the function
207−-- fails with an 'error'.
208147replace :: Binding -> Binding -> Set Binding -> Set Binding
209−replace old new bs
210− | old `Set.member` bs = Set.insert new (Set.delete old bs)
211− | otherwise = error (unwords [ "post-process: cannot replace name binding"
212− , show old, "by", show new
213− , "because it's not found in set"
214− , show bs
215− ])
148+replace old new bs = if old `Set.member` bs then Set.insert new (Set.delete old bs) else bs
216149
150+-- TODO: I need to figure out how to conveniently replace a binding in a set.
217151gtk3Hook :: Derivation -> Derivation -- https://github.com/NixOS/cabal2nix/issues/145
218152gtk3Hook = set (libraryDepends . pkgconfig . contains (pkg "gtk3")) True
219153 . over (libraryDepends . pkgconfig) (Set.filter (\b -> view localName b /= "gtk3"))
@@ -230,12 +164,13 @@ gitAnnexHook = set phaseOverrides gitAnnexOverrides
230164 where
231165 gitAnnexOverrides = unlines
232166 [ "preConfigure = \"export HOME=$TEMPDIR; patchShebangs .\";"
233− , "postBuild = ''"
167+ , "installPhase = \"make PREFIX=$out BUILDER=: install\";"
168+ , "checkPhase = ''"
234169 , " ln -sf dist/build/git-annex/git-annex git-annex"
235170 , " ln -sf git-annex git-annex-shell"
171+ , " export PATH+=\":$PWD\""
172+ , " git-annex test"
236173 , "'';"
237− , "installPhase = \"make PREFIX=$out BUILDER=: install install-completions\";"
238− , "checkPhase = ''PATH+=\":$PWD\" git-annex test'';"
239174 , "enableSharedExecutables = false;"
240175 ]
241176 buildInputs = pkgs ["git","rsync","gnupg","curl","wget","lsof","openssh","which","bup","perl"]
@@ -256,13 +191,13 @@ gfPhaseOverrides = unlines
256191 , " sed -i \"s|numJobs (bf bi)++||\" ./Setup.hs"
257192 -- Parallel compilation fails. Disable it.
258193 , "'';"
259− , "preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH'';"
194+ , "preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build:$LD_LIBRARY_PATH'';"
260195 -- The build step itself, after having built the library, needs to be able
261196 -- to find the library it just built in order to compile grammar files.
262197 ]
263198
264199wxcHook :: Derivation -> Derivation
265−wxcHook drv = drv & libraryDepends . system %~ Set.union (Set.fromList [pkg "libGL", bind "pkgs.xorg.libX11"])
200+wxcHook drv = drv & libraryDepends . system %~ Set.union (Set.fromList [pkg "mesa", bind "pkgs.xorg.libX11"])
266201 & libraryDepends . pkgconfig . contains (pkg "wxGTK") .~ True
267202 & phaseOverrides .~ wxcPostInstall (packageVersion drv)
268203 & runHaddock .~ False
@@ -292,8 +227,10 @@ darcsInstallPostInstall = unlines
292227xmonadPostInstall :: String
293228xmonadPostInstall = unlines
294229 [ "postInstall = ''"
295− , " install -D man/xmonad.1 ''${!outputDoc}/share/man/man1/xmonad.1"
296− , " install -D man/xmonad.hs ''${!outputDoc}/share/doc/$name/sample-xmonad.hs"
230+ , " shopt -s globstar"
231+ , " mkdir -p $doc/share/man/man1"
232+ , " mv \"$data/\"**\"/man/\"*[0-9] $doc/share/man/man1/"
233+ , " rm \"$data/\"**\"/man/\"*"
297234 , "'';"
298235 ]
299236
@@ -360,50 +297,8 @@ webkitgtk24xHook = set (libraryDepends . pkgconfig . contains (pkg "webkitgtk24x
360297opencvOverrides :: Derivation -> Derivation
361298opencvOverrides = set phaseOverrides "hardeningDisable = [ \"bindnow\" ];"
362299 . over (libraryDepends . pkgconfig) (replace (pkg "opencv") (pkg "opencv3"))
300+ . set (configureFlags . contains "--with-gcc=${stdenv.cc}/bin/c++") True
301+ . set (configureFlags . contains "--with-ld=${stdenv.cc}/bin/c++") True
363302
364303hspecCoreOverrides :: Derivation -> Derivation -- https://github.com/hspec/hspec/issues/330
365304hspecCoreOverrides = set phaseOverrides "testTarget = \"--test-option=--skip --test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'\";"
366−
367−cabal2nixOverrides :: Derivation -> Derivation
368−cabal2nixOverrides = set phaseOverrides $ unlines
369− [ "preCheck = ''"
370− , " export PATH=\"$PWD/dist/build/cabal2nix:$PATH\""
371− , " export HOME=\"$TMPDIR/home\""
372− , "'';"
373− ]
374−
375−gtkglextHook :: Derivation -> Derivation
376−gtkglextHook = over (libraryDepends . system) (Set.union (Set.fromList deps))
377− where
378− deps :: [Binding]
379− deps = bind <$> [ "pkgs.gtk2"
380− , "pkgs.libGLU"
381− , "pkgs.xorg.libSM"
382− , "pkgs.xorg.libICE"
383− , "pkgs.xorg.libXt"
384− , "pkgs.xorg.libXmu"
385− ]
386−
387−pandocPre26Overrides :: Derivation -> Derivation
388−pandocPre26Overrides = set phaseOverrides postInstall
389− where
390− postInstall = unlines [ "postInstall = ''"
391− , " mkdir -p $out/share"
392− , " mv $data/*/*/man $out/share/"
393− , "'';"
394− ]
395−
396−pandocOverrides :: Derivation -> Derivation
397−pandocOverrides = set phaseOverrides postInstall
398− where
399− postInstall = unlines [ "postInstall = ''"
400− , " mkdir -p $out/share/man/man1"
401− , " mv \"man/\"*.1 $out/share/man/man1/"
402− , "'';"
403− ]
404−
405−bustleOverrides :: Derivation -> Derivation
406−bustleOverrides = set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True
407− . set (executableDepends . pkgconfig . contains "gio-unix = null") False
408− . set (metaSection . license) (Known "stdenv.lib.licenses.lgpl21Plus")
409− . set (metaSection . hydraPlatforms) allKnownPlatforms