yackage 0.5.0.1 → 0.6.0
raw patch · 2 files changed
+11/−8 lines, 2 filesdep +conduitdep ~http-conduitdep ~http-typesdep ~wai
Dependencies added: conduit
Dependency ranges changed: http-conduit, http-types, wai, warp, yesod-core, yesod-form
Files
- yackage.cabal +8/−7
- yackage.hs +3/−1
yackage.cabal view
@@ -1,5 +1,5 @@ Name: yackage-Version: 0.5.0.1+Version: 0.6.0 Synopsis: Personal Hackage replacement for testing new packages. Description: This package installs a yackage executable that runs a simplistic hackage-like server. It allows you to upload packages produced via cabal sdist and install them via cabal. The trick is to add the yackage repository to your cabal config file, with a line such as:@@ -22,8 +22,8 @@ Executable yackage Main-is: yackage.hs Build-depends: base >= 4 && < 5- , yesod-core >= 1.0 && < 1.1- , warp >= 1.2 && < 1.3+ , yesod-core >= 1.1 && < 1.2+ , warp >= 1.3 && < 1.4 , Cabal , bytestring , text@@ -33,20 +33,21 @@ , directory , yaml , cmdargs- , wai >= 1.2 && < 1.3+ , wai >= 1.3 && < 1.4 , transformers , hamlet- , yesod-form >= 1.0 && < 1.1- , http-types >= 0.6 && < 0.7+ , yesod-form >= 1.1 && < 1.2+ , http-types >= 0.6 && < 0.8 , blaze-html >= 0.5 && < 0.6 , vector , unordered-containers+ , conduit Executable yackage-upload Main-is: yackage-upload.hs if flag(upload) Build-depends: base >= 4 && < 5- , http-conduit >= 1.4 && < 1.5+ , http-conduit >= 1.5 && < 1.6 , blaze-builder >= 0.2.1.3 && < 0.4 , bytestring else
yackage.hs view
@@ -45,6 +45,8 @@ import qualified Data.Text as T import Text.Blaze.Html (toHtml) import qualified Data.Vector as Vector+import Data.Conduit (($$))+import Data.Conduit.List (consume) data Args = Args { port :: Int@@ -149,7 +151,7 @@ content <- case lookup "file" files of Nothing -> error "No file upload found"- Just fi -> return $ fileContent fi+ Just fi -> fmap L.fromChunks $ lift $ fileSource fi $$ consume let entries = Tar.read $ decompress content let cabal = case getCabal entries of