packages feed

ats-pkg 1.2.0.2 → 1.2.0.3

raw patch · 5 files changed

+13/−23 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Language.ATS.Package.Dependency: fetchDeps :: [Dependency] -> IO ()
+ Language.ATS.Package.Dependency: fetchDeps :: Bool -> [Dependency] -> IO ()

Files

README.md view
@@ -1,7 +1,7 @@ # ats-pkg -This is a build system for ATS written in Haskell and configured with Dhall. It-is currently a work-in-progress. You can see a working example+This is a build system for ATS written in Haskell and configured with Dhall.+You can see a working example [here](http://github.com/vmchale/polyglot).  ## Example@@ -9,15 +9,5 @@ To build a binary package from source, run  ```bash- $ atspkg remote https://github.com/vmchale/polyglot/archive/0.3.28.tar.gz-```--## Installation--Currently, the best way to install is--```-cabal new-install ats-pkg --symlink-bindir ~/.local/bin+ $ atspkg remote https://github.com/vmchale/polyglot/archive/0.3.30.tar.gz ```--Make sure that `~/.local/bin` is on your `PATH`.
ats-pkg.cabal view
@@ -1,5 +1,5 @@ name:                ats-pkg-version:             1.2.0.2+version:             1.2.0.3 synopsis:            Package manager for ATS description:         A collection of scripts to make building ATS projects easy. homepage:            https://github.com/vmchale/ats-pkg#readme
src/Language/ATS/Package/Dependency.hs view
@@ -26,19 +26,19 @@                              }     deriving (Eq, Show, Generic, Interpret) -fetchDeps :: [Dependency] -> IO ()-fetchDeps deps =+fetchDeps :: Bool -> [Dependency] -> IO ()+fetchDeps b deps =     unless (null deps) $ do         putStrLn "Checking ATS dependencies..."-        let libs = fmap buildHelper deps+        let libs = fmap (buildHelper b) deps         parallel_ libs >> stopGlobalPool -buildHelper :: Dependency -> IO ()-buildHelper (Dependency lib' dirName' url'') = do+buildHelper :: Bool -> Dependency -> IO ()+buildHelper b (Dependency lib' dirName' url'') = do      let (lib, dirName, url') = (lib', dirName', url'') & each %~ TL.unpack -    needsSetup <- not <$> doesDirectoryExist dirName -- ++ "/atspkg.dhall")+    needsSetup <- not <$> doesDirectoryExist (dirName ++ if b then "/atspkg.dhall" else "")      when needsSetup $ do 
src/Language/ATS/Package/Exec.hs view
@@ -69,7 +69,7 @@ fetchPkg :: String -> IO () fetchPkg pkg = withSystemTempDirectory "atspkg" $ \p -> do     let (lib, dirName, url') = ("atspkg", p, pkg) & each %~ TL.pack-    fetchDeps [Dependency lib dirName url']+    fetchDeps True [Dependency lib dirName url']     ps <- fmap ((p ++ "/") ++) <$> listDirectory p     pkgDir <- fromMaybe p <$> findFile (p:ps) "atspkg.dhall"     let a = withCurrentDirectory (takeDirectory pkgDir) (mkPkg ["install"])
src/Language/ATS/Package/Type.hs view
@@ -74,8 +74,8 @@ mkClean =     "clean" ~> do     removeFilesAfter "." ["//*.1","//*.c", "tags"]-    removeFilesAfter ".shake" ["//*"]     removeFilesAfter "target" ["//*"]+    removeFilesAfter ".atspkg" ["//*"]  mkTest :: Rules () mkTest =@@ -87,7 +87,7 @@  pkgToAction :: [String] -> Pkg -> Rules () pkgToAction rs (Pkg bs ts mt v v' ds) = do-    liftIO $ fetchDeps ds+    liftIO $ fetchDeps False ds     action (need ["atspkg.dhall"])     mapM_ g (bs ++ ts)     let bins = TL.unpack . target <$> bs