Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored December 25, 2010
2  Distribution/ArchLinux/CabalTranslation.hs
@@ -46,7 +46,7 @@ preprocessCabal cabalsrc systemContext =
46 46
         (CompilerId GHC (Version [6,12,3] []))
47 47
 
48 48
         -- now constrain it to solve in the context of a modern ghc only
49  
-        (corePackages systemContext)
  49
+        (corePackages systemContext ++ platformPackages systemContext)
50 50
         cabalsrc
51 51
      of
52 52
         Left deps     -> trace ("Unresolved dependencies: " ++show deps) Nothing
12  Distribution/ArchLinux/SystemProvides.lhs
@@ -29,6 +29,9 @@ A big structure holding data about ArchLinux
29 29
 >      -- ^
30 30
 >      -- A list of Dependencies which are automatically satified
31 31
 >      -- when GHC is installed.
  32
+>   , platformPackages :: [Dependency]
  33
+>      -- ^
  34
+>      -- A list of packages to preferably use (e.g. Haskell Platform)
32 35
 >   , translationTable :: M.Map String String
33 36
 >      -- ^
34 37
 >      -- A hash-map where keys are library names and values are
@@ -40,14 +43,17 @@ Get SystemProvides from package-installed files
40 43
 > getDefaultSystemProvides :: IO SystemProvides
41 44
 > getDefaultSystemProvides = do
42 45
 >   fnc <- getDataFileName $ "data" </> "ghc-provides.txt"
  46
+>   fnp <- getDataFileName $ "data" </> "platform-provides.txt"
43 47
 >   fnt <- getDataFileName $ "data" </> "library-providers.txt"
44  
->   getSystemProvidesFromFiles fnc fnt
  48
+>   getSystemProvidesFromFiles fnc fnp fnt
45 49
 
46  
-> getSystemProvidesFromFiles :: FilePath -> FilePath -> IO SystemProvides
47  
-> getSystemProvidesFromFiles filePkg fileTranslation = do
  50
+> getSystemProvidesFromFiles :: FilePath -> FilePath -> FilePath -> IO SystemProvides
  51
+> getSystemProvidesFromFiles filePkg filePlat fileTranslation = do
48 52
 >   fc <- readFile filePkg
  53
+>   fp <- readFile filePlat
49 54
 >   ft <- readFile fileTranslation
50 55
 >   return SystemProvides { corePackages = deplistFromFile fc
  56
+>                         , platformPackages = deplistFromFile fp
51 57
 >                         , translationTable = translationTableFromFile ft }
52 58
 
53 59
 Extract a list of dependency descriptions from a file
44  data/platform-provides.txt
... ...
@@ -0,0 +1,44 @@
  1
+# Packages in GHC 6.12
  2
+array ==0.3.0.1
  3
+bytestring ==0.9.1.7
  4
+Cabal ==1.8.0.6
  5
+containers ==0.3.0.0
  6
+directory ==1.0.1.1
  7
+extensible-exceptions ==0.1.1.1
  8
+filepath ==1.1.0.4
  9
+haskell98 ==1.0.1.1
  10
+hpc ==0.5.0.5
  11
+old-locale ==1.0.0.2
  12
+old-time ==1.0.0.5
  13
+pretty ==1.0.1.1
  14
+process ==1.0.1.3
  15
+random ==1.0.0.2
  16
+syb ==0.1.0.2
  17
+template-haskell ==2.4.0.1
  18
+time ==1.1.4
  19
+unix ==2.4.0.2
  20
+# Packages in HP 2010.2
  21
+cgi ==3001.1.7.3
  22
+fgl ==5.4.2.3
  23
+GLUT ==2.1.2.1
  24
+haskell-src ==1.0.1.3
  25
+html ==1.0.1.2
  26
+HUnit ==1.2.2.1
  27
+mtl ==1.1.0.2,
  28
+network ==2.2.1.7
  29
+OpenGL ==2.2.3.0
  30
+parallel ==2.2.0.1
  31
+parsec ==2.1.0.1
  32
+QuickCheck ==2.1.1.1
  33
+regex-base ==0.93.2
  34
+regex-compat ==0.93.1
  35
+regex-posix ==0.94.2
  36
+stm ==2.1.2.1
  37
+xhtml ==3000.2.0.1
  38
+zlib ==0.5.2.0
  39
+HTTP ==4000.0.9
  40
+deepseq ==1.1.0.0
  41
+cabal-install ==0.8.2
  42
+alex ==2.3.3
  43
+happy ==1.18.5
  44
+haddock ==2.7.2

0 notes on commit 2e614b2

Please sign in to comment.
Something went wrong with that request. Please try again.