arch-hs 0.6.0.0 → 0.6.1.0
raw patch · 6 files changed
+331/−22 lines, 6 filesdep ~prettyprinterdep ~prettyprinter-ansi-terminalPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: prettyprinter, prettyprinter-ansi-terminal
API changes (from Hackage documentation)
Files
- CHANGELOG.md +8/−0
- README.md +310/−9
- arch-hs.cabal +4/−4
- diff/Diff.hs +1/−1
- src/Distribution/ArchHs/Core.hs +1/−1
- submit/Submit.hs +7/−7
CHANGELOG.md view
@@ -3,6 +3,14 @@ `arch-hs` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 0.6.1.0++* Show dependens and makedepends in `arch-hs-diff` even if there is no difference between two target versions++* Bump ghc version to 8.10.3++* Fix an alignment error in `arch-hs-submit`+ ## 0.6.0.0 * Adopt [prettyprinter](https://hackage.haskell.org/package/prettyprinter)
README.md view
@@ -76,12 +76,301 @@ **This will be fixed in next GHC release by haskell maintainers of Arch Linux.** Just run `arch-hs` in command line with options and a target. Here is an example:-we will create the archlinux package of [gi-gdk](https://hackage.haskell.org/package/gi-gdk):+we will create the archlinux package of [gi-gdk](https://hackage.haskell.org/package/gi-gdk). -```-$ arch-hs -o ~/test --alpm gi-gdk+<details open>+<summary>+Output:+</summary> -......+```+$ arch-hs -o ~/test --alpm gi-gdk +ⓘ Loading hackage from /home/berberman/.cabal/packages/hackage.haskell.org/01-index.tar+ⓘ Loading community.db from libalpm+ⓘ Start running...+⚠ Package "code-page" is provided without:+hsc2hs+⚠ Package "haskell-gi" is provided without:+hsc2hs+⚠ Package "haskell-gi-base" is provided without:+hsc2hs+⚠ Package "network" is provided without:+hsc2hs+⚠ Package "terminal-size" is provided without:+hsc2hs+ⓘ Solved:+Cabal ✔ [community]+ChasingBottoms ✔ [community]+Diff ✔ [community]+HUnit ✔ [community]+QuickCheck ✔ [community]+StateVar ✔ [community]+adjunctions ✔ [community]+aeson ✔ [community]+ansi-terminal ✔ [community]+ansi-wl-pprint ✔ [community]+assoc ✔ [community]+async ✔ [community]+attoparsec ✔ [community]+base-compat ✔ [community]+base-compat-batteries ✔ [community]+base-orphans ✔ [community]+base16-bytestring ✔ [community]+base64-bytestring ✔ [community]+bifunctors ✔ [community]+binary ✔ [community]+blaze-builder ✔ [community]+blaze-html ✔ [community]+blaze-markup ✔ [community]+bytestring ✔ [community]+bytestring-handle ✔ [community]+cabal-doctest ✔ [community]+call-stack ✔ [community]+case-insensitive ✔ [community]+charset ✔ [community]+clock ✔ [community]+code-page ✔ [community]+colour ✔ [community]+comonad ✔ [community]+concurrent-output ✔ [community]+conduit ✔ [community]+conduit-extra ✔ [community]+constraints ✔ [community]+containers ✔ [community]+contravariant ✔ [community]+data-default ✔ [community]+data-default-instances-containers ✔ [community]+data-default-instances-dlist ✔ [community]+data-default-instances-old-locale ✔ [community]+data-fix ✔ [community]+deepseq ✔ [community]+directory ✔ [community]+distributive ✔ [community]+dlist ✔ [community]+doctest ✔ [community]+exceptions ✔ [community]+filepath ✔ [community]+fingertree ✔ [community]+foldl ✔ [community]+free ✔ [community]+generic-deriving ✔ [community]+ghc ✔ [community]+ghc-boot ✔ [community]+ghc-paths ✔ [community]+ghci ✔ [community]+gi-cairo ✔ [community]+gi-gdk ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─gi-cairo [Lib,Setup] ✔ [community]+ ├─gi-gdkpixbuf [Lib,Setup] ✘+ ├─gi-gio [Lib,Setup] ✘+ ├─gi-glib [Lib,Setup] ✘+ ├─gi-gobject [Lib,Setup] ✘+ ├─gi-pango [Lib,Setup] ✘+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+gi-gdkpixbuf ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─gi-gio [Lib,Setup] ✘+ ├─gi-glib [Lib,Setup] ✘+ ├─gi-gobject [Lib,Setup] ✘+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+gi-gio ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─gi-glib [Lib,Setup] ✘+ ├─gi-gobject [Lib,Setup] ✘+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+gi-glib ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+gi-gobject ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─gi-glib [Lib,Setup] ✘+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+gi-harfbuzz ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─gi-glib [Lib,Setup] ✘+ ├─gi-gobject [Lib,Setup] ✘+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+gi-pango ✘+ ├─Cabal [Setup] ✔ [community]+ ├─bytestring [Lib] ✔ [community]+ ├─containers [Lib] ✔ [community]+ ├─gi-glib [Lib,Setup] ✘+ ├─gi-gobject [Lib,Setup] ✘+ ├─gi-harfbuzz [Lib,Setup] ✘+ ├─haskell-gi [Lib,Setup] ✔ [community]+ ├─haskell-gi-base [Lib] ✔ [community]+ ├─haskell-gi-overloading [Lib] ✔ [community]+ ├─text [Lib] ✔ [community]+ └─transformers [Lib] ✔ [community]+hashable ✔ [community]+hashable-time ✔ [community]+haskell-gi ✔ [community]+haskell-gi-base ✔ [community]+haskell-src-exts ✔ [community]+hedgehog ✔ [community]+hpc ✔ [community]+hspec ✔ [community]+hspec-core ✔ [community]+hspec-discover ✔ [community]+hspec-expectations ✔ [community]+hspec-meta ✔ [community]+indexed-traversable ✔ [community]+integer-logarithms ✔ [community]+invariant ✔ [community]+kan-extensions ✔ [community]+lens ✔ [community]+libxml ✔ [community]+lifted-async ✔ [community]+lifted-base ✔ [community]+logging-facade ✔ [community]+logict ✔ [community]+math-functions ✔ [community]+mmorph ✔ [community]+mockery ✔ [community]+monad-control ✔ [community]+mono-traversable ✔ [community]+mtl ✔ [community]+mwc-random ✔ [community]+nanospec ✔ [community]+network ✔ [community]+optparse-applicative ✔ [community]+parallel ✔ [community]+parsec ✔ [community]+parsers ✔ [community]+pcre-light ✔ [community]+pgp-wordlist ✔ [community]+pretty ✔ [community]+pretty-show ✔ [community]+prettyprinter ✔ [community]+prettyprinter-ansi-terminal ✔ [community]+primitive ✔ [community]+process ✔ [community]+profunctors ✔ [community]+quickcheck-classes-base ✔ [community]+quickcheck-instances ✔ [community]+quickcheck-io ✔ [community]+quickcheck-unicode ✔ [community]+random ✔ [community]+reducers ✔ [community]+reflection ✔ [community]+regex-base ✔ [community]+regex-posix ✔ [community]+regex-tdfa ✔ [community]+resourcet ✔ [community]+safe ✔ [community]+scientific ✔ [community]+semigroupoids ✔ [community]+setenv ✔ [community]+silently ✔ [community]+smallcheck ✔ [community]+split ✔ [community]+splitmix ✔ [community]+stm ✔ [community]+streaming-commons ✔ [community]+strict ✔ [community]+stringbuilder ✔ [community]+syb ✔ [community]+tagged ✔ [community]+tar ✔ [community]+tasty ✔ [community]+tasty-ant-xml ✔ [community]+tasty-expected-failure ✔ [community]+tasty-golden ✔ [community]+tasty-hedgehog ✔ [community]+tasty-hunit ✔ [community]+tasty-quickcheck ✔ [community]+tasty-smallcheck ✔ [community]+tasty-th ✔ [community]+template-haskell ✔ [community]+temporary ✔ [community]+terminal-size ✔ [community]+test-framework ✔ [community]+test-framework-hunit ✔ [community]+test-framework-quickcheck2 ✔ [community]+text ✔ [community]+tf-random ✔ [community]+th-abstraction ✔ [community]+these ✔ [community]+time ✔ [community]+time-compat ✔ [community]+transformers-base ✔ [community]+transformers-compat ✔ [community]+tree-diff ✔ [community]+trifecta ✔ [community]+typed-process ✔ [community]+unix ✔ [community]+unix-compat ✔ [community]+unliftio ✔ [community]+unliftio-core ✔ [community]+unordered-containers ✔ [community]+utf8-string ✔ [community]+uuid-types ✔ [community]+vector ✔ [community]+vector-algorithms ✔ [community]+vector-th-unbox ✔ [community]+wcwidth ✔ [community]+wl-pprint-annotated ✔ [community]+xdg-basedir ✔ [community]+xml ✔ [community]+xml-conduit ✔ [community]+xml-types ✔ [community]+zlib ✔ [community]+array ✔ [community]+transformers ✔ [community]+semigroups ✔ [community]+void ✔ [community]+integer-gmp ✔ [community]+hsc2hs ✘+type-equality ✔ [community]+data-default-class ✔ [community]+old-locale ✔ [community]+ghc-boot-th ✔ [community]+terminfo ✔ [community]+haskell-gi-overloading ✔ [community]+happy ✔ [community]+erf ✔ [community]+simple-reflect ✔ [community]+haskell-lexer ✔ [community]+unbounded-delays ✔ [community]+hostname ✔ [community]+extensible-exceptions ✔ [community] ⓘ Recommended package order: 1. hsc2hs@@ -93,7 +382,14 @@ 7. gi-gdkpixbuf 8. gi-gdk -......+ⓘ Detected pkgconfig or extraLib from target(s):+gi-gdk: gtk4.pc+gi-gdkpixbuf:gdk-pixbuf-2.0.pc+gi-gio: gio-2.0.pc+gi-glib: glib-2.0.pc+gi-gobject: gobject-2.0.pc+gi-harfbuzz: harfbuzz.pc, harfbuzz-gobject.pc+gi-pango: pango.pc ⓘ Now finding corresponding system package(s) using files db: ⓘ Loading core files from libalpm...@@ -110,8 +406,13 @@ pango.pc ⇒ pango ⚠ Unable to obtain all required system packages--......+ⓘ Detected flag(s) from targets:+hsc2hs+ ⚐ in-ghc-tree:+ description:+ Are we in a GHC tree?+ default: False+ isManual: True ⓘ Write file: /home/berberman/test/haskell-gi-gdk/PKGBUILD ⓘ Write file: /home/berberman/test/haskell-gi-gdkpixbuf/PKGBUILD@@ -122,10 +423,10 @@ ⓘ Write file: /home/berberman/test/haskell-gi-pango/PKGBUILD ⓘ Write file: /home/berberman/test/haskell-hsc2hs/PKGBUILD ✔ Success!- ```+</details> -This message tells us that in order to package `gi-gdk`, we must package its dependencies+This output tells us that in order to package `gi-gdk`, we must package its dependencies listed in package order, which are not present in [community] repo. Particularly, `gi-gdk` requires external system dependencies, so `arch-hs` can map them to system packages using files db.
arch-hs.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: arch-hs-version: 0.6.0.0+version: 0.6.1.0 synopsis: Distribute hackage packages to archlinux description: @arch-hs@ is a command-line program, which simplifies the process of producing@@ -23,7 +23,7 @@ CHANGELOG.md README.md -tested-with: GHC ==8.10.2+tested-with: GHC ==8.10.3 source-repository head type: git@@ -55,8 +55,8 @@ , neat-interpolation ^>=0.5.1 , optparse-applicative ^>=0.16.0 , polysemy- , prettyprinter- , prettyprinter-ansi-terminal+ , prettyprinter ^>=1.7.0+ , prettyprinter-ansi-terminal ^>=1.1.2 , req ^>=3.8.0 , split ^>=0.2.3 , tar-conduit ^>=0.3.2
diff/Diff.hs view
@@ -250,7 +250,7 @@ dep s va vb = annMagneta s <> colon <> line <> if noDiff diff- then joinToString []+ then joinToString da else joinToString da <> splitLine
src/Distribution/ArchHs/Core.hs view
@@ -48,7 +48,7 @@ archEnv _ (OS _) = Right False archEnv _ (Arch X86_64) = Right True archEnv _ (Arch _) = Right False-archEnv _ (Impl GHC range) = Right $ withinRange (mkVersion [8, 10, 2]) range+archEnv _ (Impl GHC range) = Right $ withinRange (mkVersion [8, 10, 3]) range archEnv _ (Impl _ _) = Right False archEnv assignment f@(Flag f') = go f $ lookupFlagAssignment f' assignment where
submit/Submit.hs view
@@ -172,7 +172,7 @@ unless (null failed) $ printWarn "Following packages in community are not linked to hackage:" - embed . putStrLn . unlines $ failed+ embed . putStr . unlines $ failed let api = https "hackage.haskell.org" /: "distro" /: "Arch" /: "packages.csv" r = req GET api NoReqBody bsResponse mempty@@ -182,19 +182,19 @@ hackage = parseDistroCSV . T.unpack $ decodeUtf8 bs let diff = getGroupedDiff hackage community- diffOld = mconcat . ppDiffColored . mapDiff (fmap ppRecord) <$> filterFirstDiff diff- diffNew = mconcat . ppDiffColored . mapDiff (fmap ppRecord) <$> filterSecondDiff diff- ppRecord (name, version, url) = "(" <> name <> ", " <> version <> ", " <> url <> ")\n"+ diffOld = filterFirstDiff diff >>= (ppDiffColored . mapDiff (fmap ppRecord))+ diffNew = filterSecondDiff diff >>= (ppDiffColored . mapDiff (fmap ppRecord))+ ppRecord (name, version, url) = "(" <> name <> ", " <> version <> ", " <> url <> ")" j g x = if null x then "[]" else g x- embed . putDoc . annMagneta $ "Diff" <> colon <> line embed . putDoc . indent 2 $ if noDiff diff then "[]" else- j hsep diffOld+ j cat diffOld <> splitLine- <> j hsep diffNew+ <> j cat diffNew+ <> line embed . putDoc $ "Found"