@@ -41,13 +41,13 @@ hooks =
4141 [ ("Agda < 2.5", set (executableDepends . tool . contains (pkg "emacs")) True . set phaseOverrides agdaPostInstall)
4242 , ("Agda >= 2.5", set (executableDepends . tool . contains (pkg "emacs")) True . set phaseOverrides agda25PostInstall)
4343 , ("alex < 3.1.5", set (testDepends . tool . contains (pkg "perl")) True)
44− , ("alex", set (executableDepends . tool . contains (bind "self.happy")) True)
44+ , ("alex", set (executableDepends . tool . contains (self "happy")) True)
4545 , ("alsa-core", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux))) , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
4646 , ("bindings-GLFW", over (libraryDepends . system) (Set.union (Set.fromList [bind "pkgs.xorg.libXext", bind "pkgs.xorg.libXfixes"])))
4747 , ("bindings-lxc", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux))) , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
4848 , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
4949 , ("Cabal", set doCheck False) -- test suite doesn't work in Nix
50− , ("Cabal >2.2", over (setupDepends . haskell) (Set.union (Set.fromList [bind "self.mtl", bind "self.parsec"]))) -- https://github.com/haskell/cabal/issues/5391
50+ , ("Cabal >2.2", over (setupDepends . haskell) (Set.union (Set.fromList [self "mtl", self "parsec"]))) -- https://github.com/haskell/cabal/issues/5391
5151 , ("cabal-helper", set doCheck False) -- https://github.com/DanielG/cabal-helper/issues/17
5252 , ("cabal-install", set doCheck False . set phaseOverrides cabalInstallPostInstall)
5353 , ("darcs", set phaseOverrides darcsInstallPostInstall . set doCheck False)
@@ -92,14 +92,14 @@ hooks =
9292 , ("http-client-tls >= 0.2.2", set doCheck False) -- attempts to access the network
9393 , ("http-conduit", set doCheck False) -- attempts to access the network
9494 , ("imagemagick", set (libraryDepends . pkgconfig . contains (pkg "imagemagick")) True) -- https://github.com/NixOS/cabal2nix/issues/136
95− , ("include-file <= 0.1.0.2", set (libraryDepends . haskell . contains (bind "self.random")) True) -- https://github.com/Daniel-Diaz/include-file/issues/1
95+ , ("include-file <= 0.1.0.2", set (libraryDepends . haskell . contains (self "random")) True) -- https://github.com/Daniel-Diaz/include-file/issues/1
9696 , ("js-jquery", set doCheck False) -- attempts to access the network
9797 , ("libconfig", over (libraryDepends . system) (replace "config = null" (pkg "libconfig")))
9898 , ("libxml", set (configureFlags . contains "--extra-include-dir=${libxml2.dev}/include/libxml2") True)
9999 , ("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)
100100 , ("liquidhaskell", set (testDepends . system . contains (pkg "z3")) True)
101− , ("lzma-clib", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)) . set (libraryDepends . haskell . contains (bind "self.only-buildable-on-windows")) False)
102− , ("MFlow < 4.6", set (libraryDepends . tool . contains (bind "self.cpphs")) True)
101+ , ("lzma-clib", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Windows)) . set (libraryDepends . haskell . contains (self "only-buildable-on-windows")) False)
102+ , ("MFlow < 4.6", set (libraryDepends . tool . contains (self "cpphs")) True)
103103 , ("mwc-random", set doCheck False)
104104 , ("mysql", set (libraryDepends . system . contains (pkg "mysql")) True)
105105 , ("network-attoparsec", set doCheck False) -- test suite requires network access
@@ -122,7 +122,7 @@ hooks =
122122 , ("target", set (testDepends . system . contains (pkg "z3")) True)
123123 , ("terminfo", set (libraryDepends . system . contains (pkg "ncurses")) True)
124124 , ("text", set doCheck False) -- break infinite recursion
125− , ("thyme", set (libraryDepends . tool . contains (bind "self.cpphs")) True) -- required on Darwin
125+ , ("thyme", set (libraryDepends . tool . contains (self "cpphs")) True) -- required on Darwin
126126 , ("twilio", set doCheck False) -- attempts to access the network
127127 , ("tz", set phaseOverrides "preConfigure = \"export TZDIR=${pkgs.tzdata}/share/zoneinfo\";")
128128 , ("udev", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os == Linux))) , ("bustle", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
@@ -135,13 +135,16 @@ hooks =
135135 , ("wxcore", set (libraryDepends . pkgconfig . contains (pkg "wxGTK")) True)
136136 , ("X11", over (libraryDepends . system) (Set.union (Set.fromList $ map bind ["pkgs.xorg.libXinerama","pkgs.xorg.libXext","pkgs.xorg.libXrender","pkgs.xorg.libXScrnSaver"])))
137137 , ("xmonad", set phaseOverrides xmonadPostInstall)
138− , ("zip-archive < 0.3.1", over (testDepends . tool) (replace (bind "self.zip") (pkg "zip")))
138+ , ("zip-archive < 0.3.1", over (testDepends . tool) (replace (self "zip") (pkg "zip")))
139139 , ("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
140140 ]
141141
142142pkg :: Identifier -> Binding
143143pkg i = binding # (i, path # ["pkgs",i])
144144
145+self :: Identifier -> Binding
146+self i = binding # (i, path # ["self",i])
147+
145148pkgs :: [Identifier] -> Set Binding
146149pkgs = Set.fromList . map pkg
147150