aboutsummaryrefslogtreecommitdiff
path: root/cabal-helper.cabal
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-09-18 01:23:22 +0200
committerDaniel Gröber <dxld@darkboxed.org>2017-09-18 01:35:40 +0200
commitf864a5eae8262752162c6b0d124aea4601ed9ac1 (patch)
tree1b765d25741b6e47d4ad458c8041c0881dd353b8 /cabal-helper.cabal
parent70d743eb6a8b7f8da182524fa0b2c4bf02399d50 (diff)
Fix literally everything :)
Sorry for the megacommit - Seperate modules into: - Compiletime, modules which are only used while building the package - Runtime, modues included in the wrapper binary to be compiled on the users machine at runtime - Shared, modues used in both contexts - Refactor runtime compilation - Completely revamp output paths - Don't chdir when invoking ghc - Require cabal-version 1.14 in cabal file
Diffstat (limited to 'cabal-helper.cabal')
-rw-r--r--cabal-helper.cabal77
1 files changed, 45 insertions, 32 deletions
diff --git a/cabal-helper.cabal b/cabal-helper.cabal
index 99d4200..64438c4 100644
--- a/cabal-helper.cabal
+++ b/cabal-helper.cabal
@@ -34,10 +34,9 @@ author: Daniel Gröber <dxld@darkboxed.org>
maintainer: dxld@darkboxed.org
category: Distribution
build-type: Custom
-cabal-version: >=1.10
+cabal-version: >=1.14
extra-source-files: README.md
- CabalHelper/Main.hs
- CabalHelper/Licenses.hs
+ CabalHelper/Runtime/*.hs
source-repository head
type: git
@@ -54,11 +53,13 @@ custom-setup
, transformers
library
- exposed-modules: Distribution.Helper
- other-modules: Paths_cabal_helper
- , CabalHelper.Types
- , CabalHelper.Sandbox
default-language: Haskell2010
+ default-extensions: NondecreasingIndentation
+ exposed-modules: Distribution.Helper
+ other-modules:
+ CabalHelper.Shared.Sandbox
+ CabalHelper.Shared.Types
+ Paths_cabal_helper
ghc-options: -Wall
build-depends: base < 5 && >= 4.5
, Cabal < 2.1 && >= 2.0 || < 1.26 && >= 1.14
@@ -71,17 +72,19 @@ library
executable cabal-helper-wrapper
default-language: Haskell2010
+ default-extensions: NondecreasingIndentation
other-extensions: TemplateHaskell
- main-is: CabalHelper/Wrapper.hs
- other-modules: Paths_cabal_helper
- CabalHelper.Types
- CabalHelper.Common
- CabalHelper.GuessGhc
- CabalHelper.Data
- CabalHelper.Compile
- CabalHelper.Log
- CabalHelper.Sandbox
- CabalHelper.Compat.Version
+ main-is: CabalHelper/Compiletime/Wrapper.hs
+ other-modules:
+ CabalHelper.Compiletime.Compat.Version
+ CabalHelper.Compiletime.Compile
+ CabalHelper.Compiletime.Data
+ CabalHelper.Compiletime.GuessGhc
+ CabalHelper.Compiletime.Log
+ CabalHelper.Shared.Common
+ CabalHelper.Shared.Sandbox
+ CabalHelper.Shared.Types
+ Paths_cabal_helper
ghc-options: -Wall
scope: private
x-scope: private
@@ -89,34 +92,40 @@ executable cabal-helper-wrapper
, Cabal < 2.1 && >= 2.0 || < 1.26 && >= 1.14
, bytestring < 0.11 && >= 0.9.2.1
, directory < 1.4 && >= 1.1.0.2
+ , exceptions < 0.9 && >= 0.8.3
, filepath < 1.5 && >= 1.3.0.0
, transformers < 0.6 && >= 0.3.0.0
, mtl < 2.3 && >= 2.0
, process < 1.7 && >= 1.1.0.1
, temporary < 1.3 && >= 1.2.0.4
, utf8-string < 1.1 && >= 1.0.1.1
+ , time < 1.9 && >= 1.8.0.3
, template-haskell
, ghc-prim
-test-suite spec
+test-suite compile-test
default-language: Haskell2010
+ default-extensions: NondecreasingIndentation
type: exitcode-stdio-1.0
- main-is: Spec.hs
- other-modules: CabalHelper.Common
- CabalHelper.Compile
- CabalHelper.Data
- CabalHelper.Log
- CabalHelper.Sandbox
- CabalHelper.Types
+ main-is: tests/CompileTest.hs
+ other-modules:
+ CabalHelper.Compiletime.Compat.Version
+ CabalHelper.Compiletime.Compile
+ CabalHelper.Compiletime.Data
+ CabalHelper.Compiletime.Log
+ CabalHelper.Shared.Common
+ CabalHelper.Shared.Sandbox
+ CabalHelper.Shared.Types
Distribution.Helper
Paths_cabal_helper
- hs-source-dirs: tests, .
+ hs-source-dirs: .
ghc-options: -Wall
build-tools: cabal
build-depends: base < 5 && >= 4.5
- , Cabal < 2.2 && >= 2.1 || < 1.26 && >= 1.14
+
, bytestring < 0.11 && >= 0.9.2.1
+ , Cabal < 2.1 && >= 2.0 || < 1.26 && >= 1.14
, directory < 1.4 && >= 1.1.0.2
, filepath < 1.5 && >= 1.3.0.0
, transformers < 0.6 && >= 0.3.0.0
@@ -124,6 +133,7 @@ test-suite spec
, process < 1.7 && >= 1.1.0.1
, temporary < 1.3 && >= 1.2.0.4
, utf8-string < 1.1 && >= 1.0.1.1
+ , time < 1.9 && >= 1.8.0.3
-- additional test deps
, extra < 1.6 && >= 1.4.10
@@ -131,21 +141,24 @@ test-suite spec
, template-haskell
, ghc-prim
- , cabal-helper
-- TODO: Use cabal_macros.h to replace -D flags by including it in
-- CabalHelper.Data
--
executable cabal-helper-main
+ default-language: Haskell2010
+ default-extensions: NondecreasingIndentation
if flag(dev)
buildable: True
else
buildable: False
- default-language: Haskell2010
- default-extensions: NondecreasingIndentation
- main-is: CabalHelper/Main.hs
+ main-is: CabalHelper/Runtime/Main.hs
other-modules:
- ghc-options: -Wall -fno-warn-unused-imports -optP-DCABAL_MAJOR=1 -optP-DCABAL_MINOR=25 -optP-DCABAL_HELPER=1 -optP-DCABAL_HELPER_DEV=1
+ CabalHelper.Runtime.Licenses
+ CabalHelper.Shared.Common
+ CabalHelper.Shared.Sandbox
+ CabalHelper.Shared.Types
+ ghc-options: -Wall -fno-warn-unused-imports
build-depends: base
, Cabal
, containers