From 421f17826ce1891de6aa7078ad70e4c6d9ab02c2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Apr 27 2023 16:31:19 +0000 Subject: Haskell: add usage examples of cabal-tweak-* --- diff --git a/guidelines/modules/ROOT/pages/Haskell.adoc b/guidelines/modules/ROOT/pages/Haskell.adoc index 9936bb9..6fcd400 100644 --- a/guidelines/modules/ROOT/pages/Haskell.adoc +++ b/guidelines/modules/ROOT/pages/Haskell.adoc @@ -248,12 +248,20 @@ It should be defined at the top of Lib and BinLib packages: If needed Cabal flags for build options should be set by changing the package's `+.cabal+` file: this can usually be done with the `+cabal-tweak-flag+` script to avoid having to carry and maintain patches for this. +For example `+cabal-tweak-flag systemlib True+` might enable a flag to use a system library dependency. + `+%cabal_configure_options+` can be set to pass other options to Cabal. Modifying the `+.cabal+` file flags defaults allows packagers and tools like `+cabal-rpm+` to track actual package dependencies correctly. == Dependencies -The `+cabal-tweak-dep-ver+` script can used to change version bounds of dependencies in the package's .cabal file, and similarly `+cabal-tweak-drop-dep+` for dropping a redundant dependency (eg a compatibility dummy package). +The `+cabal-tweak-dep-ver+` script can used to change version bounds of dependencies in the package's .cabal file: `+cabal-tweak-dep-ver deppkg oldbound newbound+` + +eg: `+cabal-tweak-dep-ver base '< 4.16' '< 4.17'+` + +Similarly `+cabal-tweak-drop-dep+` for dropping a redundant dependency (eg a compatibility dummy package). + +eg: `+cabal-tweak-drop-dep mtl-compat+` Spec file build dependencies are generated by the `+cabal-rpm+` packaging tool.