stack2cabal 1.0.1 → 1.0.2
raw patch · 2 files changed
+5/−5 lines, 2 files
Files
- exe/Main.hs +3/−3
- stack2cabal.cabal +2/−2
exe/Main.hs view
@@ -26,7 +26,7 @@ dir <- getCurrentDirectory stack <- readStack =<< BS.readFile (dir </> "stack.yaml") let subs = NEL.toList $ (dir </>) <$> localDirs stack- hpacks <- filterM doesFileExist $ subs+ hpacks <- filterM (\d -> doesFileExist $ hpackInput d) $ subs _ <- traverse runHpack hpacks cabals <- concat <$> traverse (globExt ".cabal") subs -- we could use the hpack output to figure out which cabal files to use, but@@ -36,9 +36,9 @@ BS.writeFile (dir </> "cabal.project") (encodeUtf8 $ printProject project) BS.writeFile (dir </> "cabal.project.freeze") (encodeUtf8 $ printFreeze freeze) where- target sub = sub </> "package.yaml"+ hpackInput sub = sub </> "package.yaml" opts = defaultOptions {optionsForce = Force}- runHpack sub = hpackResult $ setTarget (target sub) opts+ runHpack sub = hpackResult $ setTarget (hpackInput sub) opts globExt :: String -> FilePath -> IO [FilePath] globExt ext path = do
stack2cabal.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: stack2cabal-version: 1.0.1+version: 1.0.2 synopsis: Convert stack projects to cabal.project + cabal.project.freeze license: GPL-3.0-or-later license-file: LICENSE@@ -11,7 +11,7 @@ tested-with: GHC ^>= 8.4.4 || ^>= 8.6.3 category: Building description:- Convert stack.yaml / package.yaml to cabal.project / cabal.project.freeze / *.cabal.+ Convert @stack.yaml@ \/ @package.yaml@ to @cabal.project@ \/ @cabal.project.freeze@\/ @*.cabal@. -- https://www.haskell.org/cabal/users-guide/cabal-projectindex.html