packages feed

arch-hs 0.11.1.0 → 0.12.0.0

raw patch · 9 files changed

+141/−61 lines, 9 filesdep ~Cabaldep ~arch-webdep ~deepseqPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Cabal, arch-web, deepseq, megaparsec, template-haskell

API changes (from Hackage documentation)

- Distribution.ArchHs.Exception: TargetDisappearException :: PackageName -> MyException
- Distribution.ArchHs.PkgBuild: [_enableCheck] :: PkgBuild -> Bool
- Distribution.ArchHs.Aur: aurToIO :: Manager -> Members [WithMyErr, Embed IO] r => Sem (Aur : r) a -> Sem r a
+ Distribution.ArchHs.Aur: aurToIO :: Manager -> Members [WithMyErr, Embed IO] r => Sem (Aur ': r) a -> Sem r a
- Distribution.ArchHs.Internal.Prelude: class Generic a
+ Distribution.ArchHs.Internal.Prelude: class () => Generic a
- Distribution.ArchHs.Internal.Prelude: class NFData a
+ Distribution.ArchHs.Internal.Prelude: class () => NFData a
- Distribution.ArchHs.PkgBuild: PkgBuild :: String -> String -> String -> String -> String -> String -> String -> String -> String -> Maybe String -> Bool -> Bool -> String -> PkgBuild
+ Distribution.ArchHs.PkgBuild: PkgBuild :: String -> String -> String -> String -> String -> String -> String -> String -> String -> Maybe String -> Bool -> String -> PkgBuild

Files

CHANGELOG.md view
@@ -3,6 +3,20 @@ `arch-hs` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 0.12.0.0++- Update license mapping with new arch-web++- Don't skip the target if it's a missing dependency (#86)++- Use root domain for package URL submitted to Hackage++- Always generate check()++- Update dependency versions++- Update name preset+ ## 0.11.1.0  - Adapt to Arch Linux's git migration
app/Main.hs view
@@ -22,9 +22,9 @@ import qualified Data.Text as T import qualified Data.Text.IO as T import Distribution.ArchHs.Aur (Aur, aurToIO, isInAur)-import Distribution.ArchHs.ExtraDB import Distribution.ArchHs.Core import Distribution.ArchHs.Exception+import Distribution.ArchHs.ExtraDB import Distribution.ArchHs.FilesDB import Distribution.ArchHs.Hackage import Distribution.ArchHs.Internal.Prelude@@ -44,7 +44,7 @@ import System.FilePath (takeFileName)  app ::-  Members '[Embed IO, State (Set.Set PackageName), KnownGHCVersion, ExtraEnv, HackageEnv, FlagAssignmentsEnv, DependencyRecord, Trace, Aur, WithMyErr] r =>+  (Members '[Embed IO, State (Set.Set PackageName), KnownGHCVersion, ExtraEnv, HackageEnv, FlagAssignmentsEnv, DependencyRecord, Trace, Aur, WithMyErr] r) =>   PackageName ->   FilePath ->   Bool ->@@ -105,6 +105,12 @@       -- after filling extra       toBePacked1 = filledByExtra ^.. each . filtered (not . isProvided) +  -- always keep the target+  when (target `elem` missingChildren) $+    printWarn "Target is in package(s) above, but we won't skip it"+  -- missingChildren should not appear after the next line+  let missingChildrenExcludedTarget = filter (/= target) missingChildren+   (filledByBoth, toBePacked2) <- do     when aurSupport $ printInfo "Start searching AUR..."     aurProvideList <-@@ -116,15 +122,12 @@         b = a ^.. each . filtered (not . isProvided)     return (a, b) -  when (null filledByBoth) $-    throw $ TargetDisappearException target-   printInfo "Solved:"   embed $ T.putStrLn . prettySolvedPkgs $ filledByBoth    printInfo "Recommended package order:"   -- remove missingChildren from the graph iff noSkipMissing is not enabled-  let vertexesToBeRemoved = (if noSkipMissing then [] else missingChildren) <> filledByBoth ^.. each . filtered isProvided ^.. each . pkgName+  let vertexesToBeRemoved = (if noSkipMissing then [] else missingChildrenExcludedTarget) <> filledByBoth ^.. each . filtered isProvided ^.. each . pkgName       removeSelfCycle g = foldr (\n acc -> GL.removeEdge n n acc) g $ toBePacked2 ^.. each . pkgName       newGraph = GL.induce (`notElem` vertexesToBeRemoved) deps   flattened <- case G.topSort . GL.skeleton $ removeSelfCycle newGraph of@@ -136,10 +139,12 @@   let toBePacked3 = filter (\x -> x ^. pkgName `elem` flattened) toBePacked2    -- add sign for missing children if we have-  embed . putDoc $ (prettyDeps . reverse $ map (\x -> (x, x `elem` missingChildren)) flattened) <> line <> line+  embed . putDoc $ (prettyDeps . reverse $ map (\x -> (x, x `elem` missingChildrenExcludedTarget)) flattened) <> line <> line -  unless (null missingChildren || not noSkipMissing) $-    embed . putDoc $ annotate italicized $ yellowStarInParens <+> "indicates a missing package" <> line <> line+  unless (null missingChildrenExcludedTarget || not noSkipMissing) $+    embed . putDoc $+      annotate italicized $+        yellowStarInParens <+> "indicates a missing package" <> line <> line    let sysDepsToBePacked = Map.filterWithKey (\k _ -> k `elem` flattened) sysDeps @@ -206,7 +211,8 @@    when installDeps $ do     let providedDepends pkg =-          pkg ^. pkgDeps+          pkg+            ^. pkgDeps             ^.. each               . filtered (\x -> depNotMyself (pkg ^. pkgName) x && depNotInGHCLib x && x ^. depProvider == Just ByExtra)         toStr = unArchLinuxName . toArchLinuxName . _depName@@ -235,7 +241,7 @@ trySolve db dep   | (Unsolved x) <- dep,     (pkg : _) <- lookupPkg x db =-    Solved x pkg+      Solved x pkg   | otherwise = dep  isAllSolved :: [EmergedSysDep] -> Bool@@ -279,7 +285,7 @@     . runReader hackage     . runReader extra -runTrace :: Member (Embed IO) r => Bool -> FilePath -> Sem (Trace ': r) a -> Sem r a+runTrace :: (Member (Embed IO) r) => Bool -> FilePath -> Sem (Trace ': r) a -> Sem r a runTrace stdout path = interpret $ \case   Trace m -> do     when stdout (embed $ putStrLn m)@@ -322,7 +328,8 @@     optExtraCabal <- mapM findCabalFile optExtraCabalDirs      unless isExtraEmpty $-      printInfo $ "You added" <+> hsep (punctuate comma $ pretty . takeFileName <$> optExtraCabal) <+> "as extra cabal file(s), starting parsing right now"+      printInfo $+        "You added" <+> hsep (punctuate comma $ pretty . takeFileName <$> optExtraCabal) <+> "as extra cabal file(s), starting parsing right now"      parsedExtra <- mapM parseCabalFile optExtraCabal 
arch-hs.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               arch-hs-version:            0.11.1.0+version:            0.12.0.0 synopsis:           Distribute hackage packages to archlinux description:   @arch-hs@ is a command-line program, which simplifies the process of producing@@ -36,23 +36,23 @@  common common-options   build-depends:-    , aeson                        >=1.5.4    && <2.2+    , aeson                        >=1.5.4    && <2.3     , algebraic-graphs             >=0.5      && <0.8-    , arch-web                     ^>=0.2+    , arch-web                     ^>=0.3.1     , base                         >=4.12     && <5     , bytestring-    , Cabal                        >=3.2      && <3.7+    , Cabal                        >=3.2      && <3.11     , conduit                      ^>=1.3.2     , conduit-extra                ^>=1.3.5     , containers-    , deepseq                      ^>=1.4.4+    , deepseq                      ^>=1.4.4 || ^>=1.5.0     , Diff                         ^>=0.4.0     , directory                    ^>=1.3.6     , filepath                     ^>=1.4.2     , hackage-db                   ^>=2.1.0     , http-client     , http-client-tls-    , megaparsec                   ^>=9.0.0   || ^>=9.1.0  || ^>=9.2.0 || ^>=9.3.0+    , megaparsec                   ^>=9.0.0   || ^>=9.1.0  || ^>=9.2.0  || ^>=9.3.0  || ^>=9.4.0  || ^>=9.5.0  || ^>=9.6.0     , microlens                    ^>=0.4.11     , microlens-th                 ^>=0.4.3     , neat-interpolation           ^>=0.5.1@@ -60,10 +60,10 @@     , polysemy                     >=1.5.0    && <1.10     , prettyprinter                ^>=1.7.0     , prettyprinter-ansi-terminal  ^>=1.1.2-    , servant-client               >=0.18.2   && <0.20+    , servant-client               >=0.18.2   && <0.21     , split                        ^>=0.2.3-    , tar-conduit                  ^>=0.3.2-    , template-haskell             ^>=2.16.0  || ^>=2.17.0 || ^>=2.18.0+    , tar-conduit                  ^>=0.3.2   || ^>=0.4.0+    , template-haskell             ^>=2.16.0  || ^>=2.17.0 || ^>=2.18.0 || ^>=2.19.0 || ^>=2.20.0 || ^>=2.21.0     , text    ghc-options:@@ -98,10 +98,10 @@   autogen-modules: Paths_arch_hs   exposed-modules:     Distribution.ArchHs.Aur-    Distribution.ArchHs.ExtraDB     Distribution.ArchHs.Compat     Distribution.ArchHs.Core     Distribution.ArchHs.Exception+    Distribution.ArchHs.ExtraDB     Distribution.ArchHs.FilesDB     Distribution.ArchHs.Hackage     Distribution.ArchHs.Internal.Prelude
data/NAME_PRESET.json view
@@ -5,7 +5,6 @@   "arbtt": "arbtt",   "arch-hs": "arch-hs",   "bnfc": "BNFC",-  "bustle": "bustle",   "c2hs": "c2hs",   "haskell-cabal": "Cabal",   "cabal-install": "cabal-install",@@ -99,16 +98,17 @@   "hslua-cli": "hslua-cli",   "idris": "idris",   "ihaskell": "ihaskell",+  "kmonad": "kmonad",   "mighttpd2": "mighttpd2",   "misfortune": "misfortune",   "pandoc-cli": "pandoc-cli",   "pandoc-crossref": "pandoc-crossref",+  "pandoc-plot": "pandoc-plot",   "postgrest": "postgrest",   "shellcheck": "ShellCheck",   "stack": "stack",   "stylish-haskell": "stylish-haskell",   "tamarin-prover": "tamarin-prover",-  "taskell": "taskell",   "tidalcycles": "tidal",   "unlambda": "unlambda",   "uusi": "uusi",
src/Distribution/ArchHs/Core.hs view
@@ -308,7 +308,6 @@       getE (EOr x y) = getE x <> " " <> getE y        _license = getL . license $ cabal-      _enableCheck = or $ (pkg ^. pkgDeps) <&> depIsKind Test       depends =         pkg ^. pkgDeps           ^.. each
src/Distribution/ArchHs/Exception.hs view
@@ -37,7 +37,6 @@   | TargetExist PackageName DependencyProvider   | CyclicExist [PackageName]   | NetworkException ClientError-  | TargetDisappearException PackageName   | VersionNoParse String  instance Show MyException where@@ -46,7 +45,6 @@   show (TargetExist name provider) = "Target \"" <> unPackageName name <> "\" has been provided by " <> show provider   show (CyclicExist c) = "Graph contains a cycle \"" <> show (fmap unPackageName c) <> "\""   show (NetworkException e) = show e-  show (TargetDisappearException name) = "Target \"" <> unPackageName name <> "\" is discarded during the dependency resolving"   show (VersionNoParse v) = "String \"" <> v <> "\" can not be parsed to Cabal version"  -- | Catch 'CE.IOException' and print it.
src/Distribution/ArchHs/Local.hs view
@@ -33,6 +33,7 @@           "Win32",           "ghc-heap",           "ghc-byteorder",+          "ghc-platform",           -- a build-tools of "zip-archive", which is not haskell package           "unzip"         ]
src/Distribution/ArchHs/PkgBuild.hs view
@@ -48,45 +48,106 @@     _licenseFile :: Maybe String,     -- | Whether generate @prepare()@ bash function which calls @uusi@     _enableUusi :: Bool,-    -- | Whether generate @check()@ bash function-    _enableCheck :: Bool,     -- | Command-line flags     _flags :: String   }  -- | Map 'LicenseId' to 'ArchLicense'. License not provided by system will be mapped to @custom:...@. mapLicense :: LicenseId -> Arch.License-mapLicense AGPL_3_0_only = Arch.AGPL3-mapLicense Apache_2_0 = Arch.Apache-mapLicense Artistic_2_0 = Arch.Artistic2_0-mapLicense CDDL_1_0 = Arch.CDDL-mapLicense CPL_1_0 = Arch.CPL-mapLicense EPL_1_0 = Arch.EPL-mapLicense GFDL_1_2_only = Arch.FDL1_2-mapLicense GFDL_1_3_only = Arch.FDL1_3-mapLicense GPL_2_0_only = Arch.GPL2-mapLicense GPL_3_0_only = Arch.GPL3-mapLicense LGPL_2_1_only = Arch.LGPL2_1-mapLicense LGPL_3_0_only = Arch.LGPL3-mapLicense LPPL_1_3c = Arch.LPPL-mapLicense MPL_1_0 = Arch.MPL-mapLicense MPL_2_0 = Arch.MPL2-mapLicense PHP_3_01 = Arch.PHP-mapLicense Python_2_0 = Arch.PSF-mapLicense Artistic_1_0_Perl = Arch.PerlArtistic-mapLicense Ruby = Arch.RUBY-mapLicense ZPL_2_1 = Arch.ZPL+mapLicense AGPL_3_0_only = Arch.AGPL_3_0_only+mapLicense AGPL_3_0_or_later = Arch.AGPL_3_0_or_later+mapLicense Apache_2_0 = Arch.Apache_2_0+mapLicense Artistic_1_0_Perl = Arch.Artistic_1_0_Perl+mapLicense Artistic_2_0 = Arch.Artistic_2_0+mapLicense BSL_1_0 = Arch.BSL_1_0+mapLicense CC_BY_1_0 = Arch.CC_BY_1_0+mapLicense CC_BY_2_0 = Arch.CC_BY_2_0+mapLicense CC_BY_2_5 = Arch.CC_BY_2_5+mapLicense CC_BY_3_0_AT = Arch.CC_BY_3_0_AT+mapLicense CC_BY_3_0_US = Arch.CC_BY_3_0_US+mapLicense CC_BY_3_0 = Arch.CC_BY_3_0+mapLicense CC_BY_4_0 = Arch.CC_BY_4_0+mapLicense CC_BY_NC_1_0 = Arch.CC_BY_NC_1_0+mapLicense CC_BY_NC_2_0 = Arch.CC_BY_NC_2_0+mapLicense CC_BY_NC_2_5 = Arch.CC_BY_NC_2_5+mapLicense CC_BY_NC_3_0 = Arch.CC_BY_NC_3_0+mapLicense CC_BY_NC_4_0 = Arch.CC_BY_NC_4_0+mapLicense CC_BY_NC_ND_1_0 = Arch.CC_BY_NC_ND_1_0+mapLicense CC_BY_NC_ND_2_0 = Arch.CC_BY_NC_ND_2_0+mapLicense CC_BY_NC_ND_2_5 = Arch.CC_BY_NC_ND_2_5+mapLicense CC_BY_NC_ND_3_0_IGO = Arch.CC_BY_NC_ND_3_0_IGO+mapLicense CC_BY_NC_ND_3_0 = Arch.CC_BY_NC_ND_3_0+mapLicense CC_BY_NC_ND_4_0 = Arch.CC_BY_NC_ND_4_0+mapLicense CC_BY_NC_SA_1_0 = Arch.CC_BY_NC_SA_1_0+mapLicense CC_BY_NC_SA_2_0 = Arch.CC_BY_NC_SA_2_0+mapLicense CC_BY_NC_SA_2_5 = Arch.CC_BY_NC_SA_2_5+mapLicense CC_BY_NC_SA_3_0 = Arch.CC_BY_NC_SA_3_0+mapLicense CC_BY_NC_SA_4_0 = Arch.CC_BY_NC_SA_4_0+mapLicense CC_BY_ND_1_0 = Arch.CC_BY_ND_1_0+mapLicense CC_BY_ND_2_0 = Arch.CC_BY_ND_2_0+mapLicense CC_BY_ND_2_5 = Arch.CC_BY_ND_2_5+mapLicense CC_BY_ND_3_0 = Arch.CC_BY_ND_3_0+mapLicense CC_BY_ND_4_0 = Arch.CC_BY_ND_4_0+mapLicense CC_BY_SA_1_0 = Arch.CC_BY_SA_1_0+mapLicense CC_BY_SA_2_0_UK = Arch.CC_BY_SA_2_0_UK+mapLicense CC_BY_SA_2_1_JP = Arch.CC_BY_SA_2_1_JP+mapLicense CC_BY_SA_2_5 = Arch.CC_BY_SA_2_5+mapLicense CC_BY_SA_3_0_AT = Arch.CC_BY_SA_3_0_AT+mapLicense CC_BY_SA_3_0 = Arch.CC_BY_SA_3_0+mapLicense CC_BY_SA_4_0 = Arch.CC_BY_SA_4_0+mapLicense CC_PDDC = Arch.CC_PDDC+mapLicense CC0_1_0 = Arch.CC0_1_0+mapLicense CDDL_1_0 = Arch.CDDL_1_0+mapLicense CDDL_1_1 = Arch.CDDL_1_1+mapLicense CPL_1_0 = Arch.CPL_1_0+mapLicense EPL_1_0 = Arch.EPL_1_0+mapLicense EPL_2_0 = Arch.EPL_2_0+mapLicense FSFAP = Arch.FSFAP+mapLicense GFDL_1_1_invariants_only = Arch.GFDL_1_1_invariants_only+mapLicense GFDL_1_1_invariants_or_later = Arch.GFDL_1_1_invariants_or_later+mapLicense GFDL_1_1_no_invariants_only = Arch.GFDL_1_1_no_invariants_only+mapLicense GFDL_1_1_no_invariants_or_later = Arch.GFDL_1_1_no_invariants_or_later+mapLicense GFDL_1_1_only = Arch.GFDL_1_1_only+mapLicense GFDL_1_1_or_later = Arch.GFDL_1_1_or_later+mapLicense GFDL_1_2_invariants_only = Arch.GFDL_1_2_invariants_only+mapLicense GFDL_1_2_invariants_or_later = Arch.GFDL_1_2_invariants_or_later+mapLicense GFDL_1_2_no_invariants_only = Arch.GFDL_1_2_no_invariants_only+mapLicense GFDL_1_2_no_invariants_or_later = Arch.GFDL_1_2_no_invariants_or_later+mapLicense GFDL_1_2_only = Arch.GFDL_1_2_only+mapLicense GFDL_1_2_or_later = Arch.GFDL_1_2_or_later+mapLicense GFDL_1_3_invariants_only = Arch.GFDL_1_3_invariants_only+mapLicense GFDL_1_3_invariants_or_later = Arch.GFDL_1_3_invariants_or_later+mapLicense GFDL_1_3_no_invariants_only = Arch.GFDL_1_3_no_invariants_only+mapLicense GFDL_1_3_no_invariants_or_later = Arch.GFDL_1_3_no_invariants_or_later+mapLicense GFDL_1_3_only = Arch.GFDL_1_3_only+mapLicense GFDL_1_3_or_later = Arch.GFDL_1_3_or_later+mapLicense GPL_1_0_only = Arch.GPL_1_0_only+mapLicense GPL_1_0_or_later = Arch.GPL_1_0_or_later+mapLicense GPL_2_0_only = Arch.GPL_2_0_only+mapLicense GPL_2_0_or_later = Arch.GPL_2_0_or_later+mapLicense GPL_3_0_only = Arch.GPL_3_0_only+mapLicense GPL_3_0_or_later = Arch.GPL_3_0_or_later+mapLicense LGPL_2_0_only = Arch.LGPL_2_0_only+mapLicense LGPL_2_0_or_later = Arch.LGPL_2_0_or_later+mapLicense LGPL_2_1_only = Arch.LGPL_2_1_only+mapLicense LGPL_2_1_or_later = Arch.LGPL_2_1_or_later+mapLicense LGPL_3_0_only = Arch.LGPL_3_0_only+mapLicense LGPL_3_0_or_later = Arch.LGPL_3_0_or_later+mapLicense LGPLLR = Arch.LGPLLR+mapLicense LPL_1_0 = Arch.Custom "LPL-1.0"+mapLicense MPL_1_0 = Arch.MPL_1_0+mapLicense MPL_1_1 = Arch.MPL_1_1+mapLicense MPL_2_0 = Arch.MPL_2_0+mapLicense PHP_3_0 = Arch.PHP_3_0+mapLicense PHP_3_01 = Arch.PHP_3_01+mapLicense PSF_2_0 = Arch.PSF_2_0+mapLicense Ruby = Arch.Ruby mapLicense Unlicense = Arch.Unlicense mapLicense W3C = Arch.W3C-mapLicense NullBSD = Arch.BSD-mapLicense BSD_1_Clause = Arch.BSD-mapLicense BSD_2_Clause = Arch.BSD-mapLicense BSD_3_Clause = Arch.BSD-mapLicense ISC = Arch.ISC-mapLicense MIT = Arch.MIT-mapLicense Zlib = Arch.ZLIB-mapLicense OFL_1_0 = Arch.OFL-mapLicense OFL_1_1 = Arch.OFL+mapLicense WTFPL = Arch.WTFPL+mapLicense ZPL_1_1 = Arch.ZPL_1_1+mapLicense ZPL_2_0 = Arch.ZPL_2_0+mapLicense ZPL_2_1 = Arch.ZPL_2_1 mapLicense x = Arch.Custom . T.pack $ show x  -- | Show an archlinux license@@ -114,7 +175,7 @@           _ -> "\n"       )       (if _enableUusi then "\n" <> uusi <> "\n\n" else "\n")-      (if _enableCheck then "\n" <> check <> "\n\n" else "\n")+      ("\n" <> check <> "\n\n")       ( pack $ case _flags of           [] -> ""           xs -> "\\\n" <> xs
sync/Submit.hs view
@@ -34,7 +34,7 @@                 if isGHCLibs hackageName                   then "ghc"                   else unArchLinuxName archLinuxName-              prefix = "https://www.archlinux.org/packages/extra/x86_64/"+              prefix = "https://archlinux.org/packages/extra/x86_64/"       ]  -- | Check and submit distro CSV to Hackage