git.iko.soy/typeable/cabal2nix
on master help sign in
hackage2nix.hs: document limitation of finalizePackageDescription with respect to test suites
34b38cePeter Simons
src/hackage2nix.hs+7
@@ -213,6 +213,13 @@ selectLatestMatchingPackage (Dependency (PackageName name) vrange) db =
213-- <> header "hackage2nix -- convert the Hackage database into Nix build instructions"
213-- <> header "hackage2nix -- convert the Hackage database into Nix build instructions"
214-- )
214-- )
215
215
216+-- TODO: This function returns either a (minimal) list of missing dependencies
217+-- or a finalized package description of the build. Unfortunately, missing
218+-- dependencies for *testing* or *benchmarking* are not considered. I suppose,
219+-- we could turn test suites into executables for the processing to capture
220+-- their dependencies, and then add an automatic 'doCheck = false' if that
221+-- doesn't work. This whole are needs some cleanup.
222+
216cabal2nix :: (Dependency -> Bool) -> GenericPackageDescription -> Either [Dependency] Derivation
223cabal2nix :: (Dependency -> Bool) -> GenericPackageDescription -> Either [Dependency] Derivation
217cabal2nix resolver cabal = case finalize of
224cabal2nix resolver cabal = case finalize of
218 Left ds -> Left ds
225 Left ds -> Left ds