git.iko.soy/typeable/cabal2nix
on master help sign in
Fix build for haskell package 'gf'
commit35a9360495994020560785da4e3b8865e06d3d9f authorRenzo Carbonara <gnuk0001@gmail.com> dateSun 28 Jun 2015, 16:18 (11 years ago) parentdc4b804
2 files changed+16−1
src/Cabal2Nix/PostProcess.hs+16 src/hackage2nix.hs−1
src/Cabal2Nix/PostProcess.hs+16
@@ -51,6 +51,8 @@ postProcess' deriv@(MkDerivation {..})
5151 | pname == "gtk2hs-buildtools"= deriv { buildDepends = Set.insert "hashtables" buildDepends }
5252 | pname == "haddock" && version < Version [2,14] []
5353 = deriv { buildTools = Set.insert "alex" (Set.insert "happy" buildTools) }
54+ | pname == "gf" = deriv { phaseOverrides = gfPhaseOverrides
55+ , doCheck = False }
5456 | pname == "GlomeVec" = deriv { buildTools = Set.insert "llvm" buildTools }
5557 | pname == "haddock" = deriv { phaseOverrides = haddockPreCheck }
5658 | pname == "happy" = deriv { buildTools = Set.insert "perl" buildTools }
@@ -242,3 +244,17 @@ ghcParserPatchPhase = unlines
242244 , " substituteInPlace build-parser.sh --replace \"/bin/bash\" \"$SHELL\""
243245 , "'';"
244246 ]
247+
248+gfPhaseOverrides :: String
249+gfPhaseOverrides = unlines
250+ [ "postPatch = ''"
251+ , " sed -i \"s|\\\"-s\\\"|\\\"\\\"|\" ./Setup.hs"
252+ -- Disable silent compilation. Compiling takes long, it is best to see some
253+ -- output, otherwise it looks like the build step has stalled.
254+ , " sed -i \"s|numJobs (bf bi)++||\" ./Setup.hs"
255+ -- Parallel compilation fails. Disable it.
256+ , "'';"
257+ , "preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build:$LD_LIBRARY_PATH'';"
258+ -- The build step itself, after having built the library, needs to be able
259+ -- to find the library it just built in order to compile grammar files.
260+ ]
src/hackage2nix.hs−1
@@ -1404,7 +1404,6 @@ defaultConfiguration = Configuration
14041404 , "GeomPredicates-SSE"
14051405 , "getemx"
14061406 , "getflag"
1407− , "gf"
14081407 , "ggtsTC"
14091408 , "ghc-dup"
14101409 , "ghc-events-analyze"