@@ -15,17 +15,18 @@ import Distribution.NixOS.Derivation.Cabal
1515
1616cabal2nix :: Cabal.GenericPackageDescription -> Derivation
1717cabal2nix cabal = normalize $ postProcess $ MkDerivation
18− { pname = let Cabal.PackageName x = Cabal.pkgName pkg in x
19− , version = Cabal.pkgVersion pkg
20− , sha256 = "cabal2nix left the she256 field undefined"
21− , isLibrary = isJust (Cabal.library tpkg)
22− , isExecutable = not (null (Cabal.executables tpkg))
23− , buildDepends = map unDep deps
24− , buildTools = map unDep tools
25− , extraLibs = libs
26− , pkgConfDeps = pcs
27− , runHaddock = True
28− , metaSection = Meta
18+ { pname = let Cabal.PackageName x = Cabal.pkgName pkg in x
19+ , version = Cabal.pkgVersion pkg
20+ , sha256 = "cabal2nix left the she256 field undefined"
21+ , isLibrary = isJust (Cabal.library tpkg)
22+ , isExecutable = not (null (Cabal.executables tpkg))
23+ , buildDepends = map unDep deps
24+ , buildTools = map unDep tools
25+ , extraLibs = libs
26+ , pkgConfDeps = pcs
27+ , configureFlags = pkgConfigureFlags pkg
28+ , runHaddock = True
29+ , metaSection = Meta
2930 { homepage = Cabal.homepage descr
3031 , description = Cabal.synopsis descr
3132 , license = fromCabalLicense (Cabal.license descr)
@@ -34,8 +35,8 @@ cabal2nix cabal = normalize $ postProcess $ MkDerivation
3435 }
3536 }
3637 where
37− descr = Cabal.packageDescription cabal
38− pkg = Cabal.package descr
38+ descr = Cabal.packageDescription cabal
39+ pkg = Cabal.package descr
3940 deps = Cabal.buildDepends tpkg
4041 libDeps = map Cabal.libBuildInfo (maybeToList (Cabal.library tpkg))
4142 exeDeps = map Cabal.buildInfo (Cabal.executables tpkg)
@@ -43,7 +44,7 @@ cabal2nix cabal = normalize $ postProcess $ MkDerivation
4344 libs = concatMap Cabal.extraLibs (libDeps ++ exeDeps)
4445 pcs = map unDep (concatMap Cabal.pkgconfigDepends (libDeps ++ exeDeps))
4546 Right (tpkg, _) = finalizePackageDescription
46− (configureFlags pkg)
47+ (fst (pkgConfigureFlags pkg))
4748 (const True)
4849 (Platform I386 Linux) -- shouldn't be hardcoded
4950 (CompilerId GHC (Version [7,0,4] [])) -- dito