Browse files

Support for mirror://hackage

  • Loading branch information...
1 parent fa9fce7 commit dc699599478445849f82da6bfa67db5197c295fa @qnikst qnikst committed Aug 28, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −1 Portage/EBuild.hs
  2. +1 −0 hackport.cabal
View
4 Portage/EBuild.hs
@@ -11,6 +11,7 @@ import Portage.Dependency
import Distribution.License as Cabal
+import Data.String.Utils
import Data.Version(Version(..))
import qualified Paths_hackport(version)
@@ -93,7 +94,7 @@ showEBuild ebuild =
ss "MY_P=". quote "${MY_PN}-${PV}". nl. nl).
ss "DESCRIPTION=". quote (description ebuild). nl.
ss "HOMEPAGE=". quote (expandVars (homepage ebuild)). nl.
- ss "SRC_URI=". quote (src_uri ebuild). nl.
+ ss "SRC_URI=". quote (toMirror $ src_uri ebuild). nl.
nl.
ss "LICENSE=". quote (convertLicense . license $ ebuild).
(if null (licenseComment . license $ ebuild) then id
@@ -111,6 +112,7 @@ showEBuild ebuild =
where expandVars = replaceMultiVars [ ( name ebuild, "${PN}")
, (hackage_name ebuild, "${HACKAGE_N}")
]
+ toMirror = replace "http://hackage.haskell.org/" "mirror://hackage/"
ss :: String -> String -> String
ss = showString
View
1 hackport.cabal
@@ -29,6 +29,7 @@ Executable hackport
network,
pretty,
regex-compat,
+ MissingH,
HTTP >= 4000.0.3,
zlib,
tar,

0 comments on commit dc69959

Please sign in to comment.