packages feed

hub 1.0.0 → 1.1.0

raw patch · 8 files changed

+49/−17 lines, 8 files

Files

+ .hub view
@@ -0,0 +1,1 @@+build-hub
Hub/Commands.hs view
@@ -116,8 +116,9 @@     [ printf "      GHC              : %s" hc                | Just hc <- [bin2toolchain hc_bin] ] ++     [ printf "      Haskell Platform : %s" hp                | Just hp <- [db2platform   glb_db] ] ++     [ printf "      Tools            : %s"         hc_bin                                        ] ++-    [        "      Package DBs"                             |                         True      ] ++-    [ printf "          global       : %-50s (%s)" glb_db gh |                         True      ] +++    [ printf "      Cabal Install    : %s"         cv        | Just cv <- [ci_vrn]               ] +++    [        "      Package DBs"                                                                 ] +++    [ printf "          global       : %-50s (%s)" glb_db gh                                     ] ++     [ printf "          user         : %-50s (%s)" usr_db uh | Just usr_db <- [mb_ud], True      ]   where     hs     = case sourceHUB hub of@@ -136,6 +137,7 @@     name   = name__HUB hub     cmt0   = commntHUB hub     hc_bin = hc_binHUB hub+    ci_vrn = ci_vrnHUB hub     glb_db = glb_dbHUB hub     mb_ud  = usr_dbHUB hub 
Hub/Hub.hs view
@@ -47,6 +47,7 @@     , commntHUB :: String     , hc_binHUB :: FilePath     , tl_binHUB :: FilePath+    , ci_vrnHUB :: Maybe String     , glb_dbHUB :: FilePath     , usr___HUB :: Maybe UsrHub     }                                                           deriving (Show)@@ -141,8 +142,8 @@         return (exe,as,tdy)       where         exe =   case typPROG prog of-                  HcPT -> hc_binHUB hub </> nmePROG prog-                  TlPT -> tl_binHUB hub </> nmePROG prog+                  HcPT -> hc_binHUB hub </> nmePROG       prog+                  TlPT -> tl_binHUB hub </> prog_name hub prog          hk  =   kind__HUB hub @@ -152,6 +153,12 @@                 let _ld = "--libdir="     ++ hd                     _pd = "--package-db=" ++ db                 return ( cmd : _ld : _pd : as', Just hd )++prog_name :: Hub -> Prog -> FilePath+prog_name hub prog =+        case (enmPROG prog,ci_vrnHUB hub) of+          (CabalP,Just ci_vrn) -> nmePROG prog ++ "-" ++ ci_vrn+          _                    -> nmePROG prog  hub_env :: Mode -> Hub -> String -> [(String,String)] hub_env mde hub pth0 = concat
Hub/Parse.hs view
@@ -44,6 +44,8 @@             , printf "  <hcbin>%s</hcbin>" $ string2xml hcbin             , printf "  <tlbin>%s</tlbin>" $ string2xml tlbin             ] +++            [ printf "  <civrn>%s</civrn>" $ string2xml civrn | Just civrn<-[mb_civrn]+            ] ++             [ printf "  <glbdb>%s</glbdb>" $ string2xml glbdb             ] ++             [ printf "  <usrgh>%s</usrgh>" $ string2xml usrgh | Just usrgh<-[mb_usrgh]@@ -65,6 +67,7 @@         comnt    = commntHUB hub         hcbin    = hc_binHUB hub         tlbin    = tl_binHUB hub+        mb_civrn = ci_vrnHUB hub         glbdb    = glb_dbHUB hub         mb_uh    = usr___HUB hub @@ -109,6 +112,7 @@                     , chk_comnt                     , chk_hcbin                     , chk_tlbin+                    , chk_civrn                     , chk_glbdb                     , chk_usrdb                     , chk_usrgh@@ -126,6 +130,7 @@     , comntST :: Maybe String     , hcbinST :: Maybe FilePath     , tlbinST :: Maybe FilePath+    , civrnST :: Maybe FilePath     , glbdbST :: Maybe FilePath     , usrghST :: Maybe FilePath     , usrdbST :: Maybe FilePath@@ -134,7 +139,7 @@  start :: HubName -> FilePath -> Loc -> PSt start hn fp lc =-            ST hn fp lc Nothing Nothing Nothing Nothing Nothing Nothing Nothing+    ST hn fp lc Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing  final :: HubSource -> FilePath -> HubKind -> Poss Err PSt -> Poss Err Hub final _  _  _  (NOPE er) = NOPE er@@ -142,17 +147,19 @@      do co    <- get_co         hc    <- get_hc         tl    <- get_tl+        cv    <- get_cv         gl    <- get_gl         mb_pr <- case (mb_ur,mb_gh) of                    (Just ur,Nothing) -> (Just . ((,) ur)) `fmap` calc_gh gl                    (Just ur,Just gh) -> return $ Just (ur,gh)                    (Nothing,_      ) -> return Nothing-        return $ HUB hs hn hk hf co hc tl gl $ fmap mk_uhb mb_pr+        return $ HUB hs hn hk hf co hc tl cv gl $ fmap mk_uhb mb_pr       where-        get_co = maybe (YUP   ""      ) YUP mb_co-        get_hc = maybe (NOPE  hc_err  ) YUP mb_hc-        get_tl = maybe (YUP $ toolsBin) YUP mb_tl-        get_gl = maybe (NOPE  gl_err  ) YUP mb_gl+        get_co = maybe (YUP  ""      )  YUP         mb_co+        get_hc = maybe (NOPE hc_err  )  YUP         mb_hc+        get_tl = maybe (YUP  toolsBin)  YUP         mb_tl+        get_cv = maybe (YUP  Nothing ) (YUP . Just) mb_cv+        get_gl = maybe (NOPE gl_err  )  YUP         mb_gl          hc_err = err lc "Hub doesn't specify a GHC bin directory"         gl_err = err lc "Hub doesn't specify a global package directory"@@ -167,7 +174,7 @@                 msg = "Could not derive the global hub name from the "                                    ++ "filepath of the global package databse" -        ST hn hf lc mb_co mb_hc mb_tl mb_gl mb_gh mb_ur mb_lk = st+        ST hn hf lc mb_co mb_hc mb_tl mb_cv mb_gl mb_gh mb_ur mb_lk = st  trial :: PSt -> Node -> (PSt -> Node -> Maybe(Poss Err PSt)) -> Poss Err PSt -> Poss Err PSt trial st nd f ps = maybe ps id $ f st nd@@ -179,7 +186,7 @@                                                           lc = locwfST st  chk_comnt, chk_wspce, chk_hcbin, chk_tlbin,-        chk_glbdb, chk_usrgh, chk_usrdb,+        chk_civrn, chk_glbdb, chk_usrgh, chk_usrdb,         chk_hpbin, chk_cibin, chk_lockd :: PSt -> Node -> Maybe(Poss Err PSt)  chk_wspce st nd =@@ -211,6 +218,13 @@                         case tlbinST st of                           Nothing -> YUP (st{tlbinST=Just arg})                           Just _  -> NOPE $ err lc "<cibin> re-specified"++chk_civrn st0 nd = simple_node False st0 nd "civrn" chk+              where+                chk st lc arg =+                        case civrnST st of+                          Nothing -> YUP (st{civrnST=Just arg})+                          Just _  -> NOPE $ err lc "<civrn> re-specified"  chk_glbdb st0 nd = simple_node False st0 nd "glbdb" chk               where
Version.hs view
@@ -13,7 +13,7 @@   version :: String-version = "1.0.0"+version = "1.1.0"   main :: IO ()
hub.cabal view
@@ -1,5 +1,5 @@ Name:                   hub-Version:                1.0.0+Version:                1.1.0 Copyright:              Chris Dornan, 2011-2012 Maintainer:             Chris Dornan <chris@chrisdornan.com> Author:                 Chris Dornan <chris@chrisdornan.com>@@ -14,8 +14,8 @@                         .                         The package also provides flexible development sandboxes                          (aka /hubs/) into which packages can be installed-                        and subsequently erased. Command are provided for-                        (re)naming, sharing, replicating, swapping, archiving,+                        and subsequently erased. Commands are provided for+                        (re)naming, annotating, replicating, swapping, archiving,                         locking and removing hubs. E.g.,                         .                         > hub init@@ -56,6 +56,7 @@ Stability:              Beta Category:               Development, Distribution Homepage:               https://justhub.org+Bug-Reports:            https://github.com/haskell-hub/hub-src/issues Build-type:             Simple Cabal-version:          >= 1.10 
man/hub-5.txt view
@@ -35,6 +35,12 @@     The path of directory containing the generic tools (especially `cabal`)     to be used with the hub. +`<civrn>`::+    +    The version of 'Cabal-install' to use with this hub. The presence of this+    node is optional. When present it will force the use of+    '<tlbin>/cabal-<civrn>' for the cabal executable.+ `<glbdb>`::      The path of the global package database to be used with the@@ -53,7 +59,7 @@ `<lockd>`::      The presence of this node signifies that the hub is locked. If it is-    present it should contain the string "rmie".  (Only user hubs can+    present it should contain the string "rmie".  (Only user hubs may     be locked.)  @@ -82,6 +88,7 @@       <comnt>Hub for building the hub tool</comnt>       <hcbin>/usr/hs/ghc/7.4.1/bin</hcbin>       <tlbin>/usr/hs/tools</tlbin>+      <civrn>0.14.0</civrn>       <usrgh>7.4.1</usrgh>       <glbdb>/usr/hs/db/7.4.1.d</glbdb>       <usrdb>/home/chris/.hubrc/lib/hub-src/package.config</usrdb>
man/hub.5.gz view

binary file changed (1445 → 1544 bytes)