git.iko.soy/typeable/cabal2nix
on master help sign in
Minor refactoring.
commit1aadebbfdd5bf2b5df9d5b5c2d8ce6b2f27e6146 authorAndres Loeh <mail@andres-loeh.de> dateSat 6 Aug 2011, 12:58 (15 years ago) parentfb4cc0f
1 file changed+2−1
src/Cabal2Nix.hs+2−1
src/Cabal2Nix.hs+2−1
@@ -14,6 +14,7 @@ import Distribution.PackageDescription
1414import Distribution.Package
1515import Data.Version
1616import Data.List
17+import Data.Maybe
1718import Control.Monad
1819import Network.HTTP
1920import System.Process
@@ -30,7 +31,7 @@ cabal2nix cabal sha256 = Pkg pkgname pkgver sha256 url desc lic (map simplify li
3031 url = homepage pkg
3132 desc = synopsis pkg
3233 -- globalDeps = buildDepends pkg
33− libDeps = maybe [] (\x -> [x]) (condLibrary cabal)
34+ libDeps = maybeToList (condLibrary cabal)
3435 exeDeps = [ tree | (_,tree) <- condExecutables cabal ]
3536 libs = concat [ extraLibs (libBuildInfo (condTreeData x)) | x <- libDeps ]
3637 libs' = concat [ extraLibs (buildInfo (condTreeData x)) | x <- exeDeps ]