From 775507c2d432b9d92de83a551eb05257f050a49f Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 31 Mar 2025 16:53:21 -1000 Subject: [PATCH] ;pkg:cabal: specify GPLv3+ exactly; require cabal 2.2+ [#2359] Previously our cabal files used cabal-version 1.12, and were in theory buildable with any ancient version of cabal. Now at least cabal 2.2 (or a version of stack built with with similar Cabal version) is required to build hledger. --- hledger-lib/hledger-lib.cabal | 6 ++++-- hledger-lib/package.yaml | 2 +- hledger-ui/hledger-ui.cabal | 8 ++++++-- hledger-ui/package.yaml | 2 +- hledger-web/hledger-web.cabal | 8 ++++++-- hledger-web/package.yaml | 2 +- hledger/hledger.cabal | 8 ++++++-- hledger/package.yaml | 2 +- 8 files changed, 26 insertions(+), 12 deletions(-) diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index 2ba5c09c5..31af16f28 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -1,4 +1,4 @@ -cabal-version: 1.12 +cabal-version: 2.2 -- This file has been generated from package.yaml by hpack version 0.38.0. -- @@ -30,7 +30,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org author: Simon Michael maintainer: Simon Michael -license: GPL-3 +license: GPL-3.0-or-later license-file: LICENSE build-type: Simple tested-with: @@ -116,6 +116,8 @@ library Text.WideString other-modules: Paths_hledger_lib + autogen-modules: + Paths_hledger_lib hs-source-dirs: ./ ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 48e2be30c..d32a3dfd2 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -21,7 +21,7 @@ description: | - https://hackage.haskell.org/package/hledger-lib/docs/Hledger.html - starting point for hledger's haddock docs category: Finance -license: GPL-3 +license: GPL-3.0-or-later author: Simon Michael maintainer: Simon Michael github: simonmichael/hledger diff --git a/hledger-ui/hledger-ui.cabal b/hledger-ui/hledger-ui.cabal index 084ebf3d3..3ca277104 100644 --- a/hledger-ui/hledger-ui.cabal +++ b/hledger-ui/hledger-ui.cabal @@ -1,4 +1,4 @@ -cabal-version: 1.12 +cabal-version: 2.2 -- This file has been generated from package.yaml by hpack version 0.38.0. -- @@ -22,7 +22,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org author: Simon Michael maintainer: Simon Michael -license: GPL-3 +license: GPL-3.0-or-later license-file: LICENSE build-type: Simple tested-with: @@ -69,6 +69,8 @@ library Hledger.UI.UITypes Hledger.UI.UIUtils Paths_hledger_ui + autogen-modules: + Paths_hledger_ui hs-source-dirs: ./ ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind @@ -117,6 +119,8 @@ executable hledger-ui main-is: hledger-ui.hs other-modules: Paths_hledger_ui + autogen-modules: + Paths_hledger_ui hs-source-dirs: app ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -with-rtsopts=-T diff --git a/hledger-ui/package.yaml b/hledger-ui/package.yaml index 53a8e7bbe..92f691051 100644 --- a/hledger-ui/package.yaml +++ b/hledger-ui/package.yaml @@ -13,7 +13,7 @@ description : | category : Finance, Console -license : GPL-3 +license : GPL-3.0-or-later author : Simon Michael maintainer : Simon Michael github : simonmichael/hledger diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index 0b0462199..57e66288c 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -1,4 +1,4 @@ -cabal-version: 1.12 +cabal-version: 2.2 -- This file has been generated from package.yaml by hpack version 0.38.0. -- @@ -24,7 +24,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org author: Simon Michael maintainer: Simon Michael -license: GPL-3 +license: GPL-3.0-or-later license-file: LICENSE build-type: Simple tested-with: @@ -153,6 +153,8 @@ library Hledger.Web.Widget.AddForm Hledger.Web.Widget.Common Paths_hledger_web + autogen-modules: + Paths_hledger_web hs-source-dirs: ./ ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns @@ -220,6 +222,8 @@ executable hledger-web main-is: main.hs other-modules: Paths_hledger_web + autogen-modules: + Paths_hledger_web hs-source-dirs: app ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -with-rtsopts=-T diff --git a/hledger-web/package.yaml b/hledger-web/package.yaml index 6587d1cbb..8206a056e 100644 --- a/hledger-web/package.yaml +++ b/hledger-web/package.yaml @@ -15,7 +15,7 @@ description: | category: Finance -license: GPL-3 +license: GPL-3.0-or-later author: Simon Michael maintainer: Simon Michael github: simonmichael/hledger diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index f8959d0e7..27bde15c1 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -1,4 +1,4 @@ -cabal-version: 1.12 +cabal-version: 2.2 -- This file has been generated from package.yaml by hpack version 0.38.0. -- @@ -23,7 +23,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org author: Simon Michael maintainer: Simon Michael -license: GPL-3 +license: GPL-3.0-or-later license-file: LICENSE build-type: Simple tested-with: @@ -149,6 +149,8 @@ library Hledger.Cli.Version other-modules: Paths_hledger + autogen-modules: + Paths_hledger ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -optP-Wno-nonportable-include-path cpp-options: -DVERSION="1.42.99" build-depends: @@ -199,6 +201,8 @@ executable hledger main-is: hledger-cli.hs other-modules: Paths_hledger + autogen-modules: + Paths_hledger hs-source-dirs: app ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -optP-Wno-nonportable-include-path -with-rtsopts=-T diff --git a/hledger/package.yaml b/hledger/package.yaml index 6e3f67d1e..1693a0064 100644 --- a/hledger/package.yaml +++ b/hledger/package.yaml @@ -14,7 +14,7 @@ description: | category: Finance, Console -license: GPL-3 +license: GPL-3.0-or-later author: Simon Michael maintainer: Simon Michael github: simonmichael/hledger