packages feed

haskell-gi 0.17.2 → 0.17.3

raw patch · 3 files changed

+59/−19 lines, 3 files

Files

haskell-gi.cabal view
@@ -1,5 +1,5 @@ name:                haskell-gi-version:             0.17.2+version:             0.17.3 synopsis:            Generate Haskell bindings for GObject Introspection capable libraries description:         Generate Haskell bindings for GObject Introspection capable libraries. This includes most notably                      Gtk+, but many other libraries in the GObject ecosystem provide introspection data too.
lib/Data/GI/CodeGen/Cabal.hs view
@@ -21,7 +21,7 @@ import Data.GI.CodeGen.Config (Config(..)) import Data.GI.CodeGen.Overrides (pkgConfigMap, cabalPkgVersion) import Data.GI.CodeGen.PkgConfig (pkgConfigGetVersion)-import Data.GI.CodeGen.ProjectInfo (homepage, license, authors, maintainers)+import qualified Data.GI.CodeGen.ProjectInfo as PI import Data.GI.CodeGen.Util (padTo, tshow)  import Paths_haskell_gi (version)@@ -137,28 +137,29 @@                <> " bindings"       line $ padTo 20 "description:" <> "Bindings for " <> name                <> ", autogenerated by haskell-gi."-      line $ padTo 20 "homepage:" <> homepage-      line $ padTo 20 "license:" <> license+      line $ padTo 20 "homepage:" <> PI.homepage+      line $ padTo 20 "license:" <> PI.license       line $ padTo 20 "license-file:" <> "LICENSE"-      line $ padTo 20 "author:" <> authors-      line $ padTo 20 "maintainer:" <> maintainers-      line $ padTo 20 "category:" <> "Bindings"+      line $ padTo 20 "author:" <> PI.authors+      line $ padTo 20 "maintainer:" <> PI.maintainers+      line $ padTo 20 "category:" <> PI.category       line $ padTo 20 "build-type:" <> "Simple"       line $ padTo 20 "cabal-version:" <> ">=1.10"       blank       line $ "library"       indent $ do-        line $ padTo 20 "default-language:" <> "Haskell2010"-        line $ padTo 20 "default-extensions:" <> "NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts"-        line $ padTo 20 "other-extensions:" <> "PatternSynonyms ViewPatterns"-        line $ padTo 20 "ghc-options:" <> "-fno-warn-unused-imports -fno-warn-warnings-deprecations"+        line $ padTo 20 "default-language:" <> PI.defaultLanguage+        line $ padTo 20 "default-extensions:" <>+             T.intercalate ", " PI.defaultExtensions+        line $ padTo 20 "other-extensions:" <>+             T.intercalate ", " PI.otherExtensions+        line $ padTo 20 "ghc-options:" <> T.intercalate " " PI.ghcOptions         line $ padTo 20 "exposed-modules:" <> head exposedModules         forM_ (tail exposedModules) $ \mod ->               line $ padTo 20 "" <> mod         line $ padTo 20 "pkgconfig-depends:" <> pcName <> " >= "                  <> tshow major <> "." <> tshow minor-        line $ padTo 20 "build-depends: base >= "-                 <> showBaseVersion minBaseVersion <> " && <5,"+        line $ "build-depends:"         indent $ do           line $ "haskell-gi-base >= "                    <> tshow haskellGIAPIVersion <> "." <> tshow haskellGIMinor@@ -174,11 +175,7 @@                        <> " && < "                        <> giNextMinor depMajor depMinor                        <> ","-          -- Our usage of these is very basic, no reason to put any-          -- strong upper bounds.-          line "bytestring >= 0.10,"-          line "containers >= 0.5,"-          line "text >= 1.0,"-          line "transformers >= 0.3"+          forM_ PI.standardDeps (line . (<> ","))+          line $ "base >= " <> showBaseVersion minBaseVersion <> " && <5"        return Nothing -- successful generation, no error
lib/Data/GI/CodeGen/ProjectInfo.hs view
@@ -6,7 +6,13 @@     , authors     , license     , licenseText+    , category     , maintainers+    , defaultExtensions+    , otherExtensions+    , ghcOptions+    , defaultLanguage+    , standardDeps     ) where  import Data.FileEmbed (embedStringFile)@@ -26,3 +32,40 @@  licenseText :: Text licenseText = $(embedStringFile "LICENSE")++-- | Default list of extensions to turn on when compiling the+-- generated code.+defaultExtensions :: [Text]+defaultExtensions = ["NoImplicitPrelude", "ScopedTypeVariables", "CPP",+                     "OverloadedStrings", "NegativeLiterals", "ConstraintKinds",+                     "TypeFamilies", "MultiParamTypeClasses", "KindSignatures",+                     "FlexibleInstances", "UndecidableInstances", "DataKinds",+                     "FlexibleContexts"]++-- | Extensions that will be used in some modules, but we do not wish+-- to turn on by default.+otherExtensions :: [Text]+otherExtensions = ["PatternSynonyms", "ViewPatterns"]++-- | Default options for GHC when compiling generated code.+ghcOptions :: [Text]+ghcOptions = ["-fno-warn-unused-imports", "-fno-warn-warnings-deprecations"]++-- | Default version of the report to use.+defaultLanguage :: Text+defaultLanguage = "Haskell2010"++-- | List of dependencies for all bindings. Notice that base is not+-- included here, since not all bindings use the same base+-- version. haskell-gi and haskell-gi-base are not included either,+-- since the versions to use may change depending on whether we are+-- using old style or new style bindings.+standardDeps :: [Text]+standardDeps = ["bytestring >= 0.10 && < 1",+                "containers >= 0.5 && < 1",+                "text >= 1.0 && < 2",+                "transformers >= 0.4 && < 1"]++-- | Under which category in hackage should the generated bindings be listed.+category :: Text+category = "Bindings"