Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add support for a "platform package list" : this list is passed to the

Cabal library, it can be used to favour a particular dependency
version in the resulting PKGBUILD.
  • Loading branch information...
commit 2e614b2f26b037308ab87d4f5434ef2eb5385f4d 1 parent c4790bb
Rémy Oudompheng authored
View
2  Distribution/ArchLinux/CabalTranslation.hs
@@ -46,7 +46,7 @@ preprocessCabal cabalsrc systemContext =
(CompilerId GHC (Version [6,12,3] []))
-- now constrain it to solve in the context of a modern ghc only
- (corePackages systemContext)
+ (corePackages systemContext ++ platformPackages systemContext)
cabalsrc
of
Left deps -> trace ("Unresolved dependencies: " ++show deps) Nothing
View
12 Distribution/ArchLinux/SystemProvides.lhs
@@ -29,6 +29,9 @@ A big structure holding data about ArchLinux
> -- ^
> -- A list of Dependencies which are automatically satified
> -- when GHC is installed.
+> , platformPackages :: [Dependency]
+> -- ^
+> -- A list of packages to preferably use (e.g. Haskell Platform)
> , translationTable :: M.Map String String
> -- ^
> -- A hash-map where keys are library names and values are
@@ -40,14 +43,17 @@ Get SystemProvides from package-installed files
> getDefaultSystemProvides :: IO SystemProvides
> getDefaultSystemProvides = do
> fnc <- getDataFileName $ "data" </> "ghc-provides.txt"
+> fnp <- getDataFileName $ "data" </> "platform-provides.txt"
> fnt <- getDataFileName $ "data" </> "library-providers.txt"
-> getSystemProvidesFromFiles fnc fnt
+> getSystemProvidesFromFiles fnc fnp fnt
-> getSystemProvidesFromFiles :: FilePath -> FilePath -> IO SystemProvides
-> getSystemProvidesFromFiles filePkg fileTranslation = do
+> getSystemProvidesFromFiles :: FilePath -> FilePath -> FilePath -> IO SystemProvides
+> getSystemProvidesFromFiles filePkg filePlat fileTranslation = do
> fc <- readFile filePkg
+> fp <- readFile filePlat
> ft <- readFile fileTranslation
> return SystemProvides { corePackages = deplistFromFile fc
+> , platformPackages = deplistFromFile fp
> , translationTable = translationTableFromFile ft }
Extract a list of dependency descriptions from a file
View
44 data/platform-provides.txt
@@ -0,0 +1,44 @@
+# Packages in GHC 6.12
+array ==0.3.0.1
+bytestring ==0.9.1.7
+Cabal ==1.8.0.6
+containers ==0.3.0.0
+directory ==1.0.1.1
+extensible-exceptions ==0.1.1.1
+filepath ==1.1.0.4
+haskell98 ==1.0.1.1
+hpc ==0.5.0.5
+old-locale ==1.0.0.2
+old-time ==1.0.0.5
+pretty ==1.0.1.1
+process ==1.0.1.3
+random ==1.0.0.2
+syb ==0.1.0.2
+template-haskell ==2.4.0.1
+time ==1.1.4
+unix ==2.4.0.2
+# Packages in HP 2010.2
+cgi ==3001.1.7.3
+fgl ==5.4.2.3
+GLUT ==2.1.2.1
+haskell-src ==1.0.1.3
+html ==1.0.1.2
+HUnit ==1.2.2.1
+mtl ==1.1.0.2,
+network ==2.2.1.7
+OpenGL ==2.2.3.0
+parallel ==2.2.0.1
+parsec ==2.1.0.1
+QuickCheck ==2.1.1.1
+regex-base ==0.93.2
+regex-compat ==0.93.1
+regex-posix ==0.94.2
+stm ==2.1.2.1
+xhtml ==3000.2.0.1
+zlib ==0.5.2.0
+HTTP ==4000.0.9
+deepseq ==1.1.0.0
+cabal-install ==0.8.2
+alex ==2.3.3
+happy ==1.18.5
+haddock ==2.7.2
Please sign in to comment.
Something went wrong with that request. Please try again.