File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
synopsis: Better support for scripts
2
2
packages: cabal-install
3
- prs: #7851 #7925 #7938 #7990
4
- issues: #7842 #7073 #6354 #6149 #5508
3
+ prs: #7851 #7925 #7938 #7990 #7997
4
+ issues: #7842 #7073 #6354 #6149 #5508 #5698
5
5
6
6
description: {
7
7
@@ -15,5 +15,7 @@ description: {
15
15
- The name of the generated script executable has been changed from "script" to
16
16
"cabal-script-<your-sanitized-script-name>" for easier process management.
17
17
- Reduce the default verbosity of scripts, so that the build output doesn't interfere with the script output.
18
+ - Scripts now support a project metadata block that allows them to use options
19
+ that would normally be set in a cabal.project file.
18
20
19
21
}
Original file line number Diff line number Diff line change @@ -465,14 +465,21 @@ a script that looks like:
465
465
466
466
#!/usr/bin/env cabal
467
467
{- cabal:
468
- build-depends: base ^>= 4.11
469
- , shelly ^>= 1.8.1
468
+ build-depends: base ^>= 4.14
469
+ , shelly ^>= 1.10
470
+ -}
471
+ {- project:
472
+ with-compiler: ghc-8.10.7
470
473
-}
471
474
472
475
main :: IO ()
473
476
main = do
474
477
...
475
478
479
+ Where there cabal metadata block is mandatory and contains fields from a
480
+ package executable block, and the project metadata block is optional and
481
+ contains fields that would be in the cabal.project file in a regular project.
482
+
476
483
It can either be executed like any other script, using ``cabal `` as an
477
484
interpreter, or through this command:
478
485
You can’t perform that action at this time.
0 commit comments