Skip to content

Commit 3bbbb40

Browse files
authored
Allow merging cabalProject{,Local,Freeze} (#1638)
* Allow merging cabalProject{,Local,Freeze} * Specify types of `sha256map` and `configureArgs` * Fix type of `sha256map`
1 parent 5968c65 commit 3bbbb40

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/cabal-project.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ in {
4545
default = "cabal.project";
4646
};
4747
cabalProject = mkOption {
48-
type = nullOr str;
48+
type = nullOr lines;
4949
default = readIfExists config.src config.cabalProjectFileName;
5050
};
5151
cabalProjectLocal = mkOption {
52-
type = nullOr str;
52+
type = nullOr lines;
5353
default = readIfExists config.src "${config.cabalProjectFileName}.local";
5454
};
5555
cabalProjectFreeze = mkOption {
56-
type = nullOr str;
56+
type = nullOr lines;
5757
default = readIfExists config.src "${config.cabalProjectFileName}.freeze";
5858
};
5959
ghc = mkOption {
@@ -79,7 +79,7 @@ in {
7979
description = "cabal-install to use when running `cabal configure`";
8080
};
8181
configureArgs = mkOption {
82-
type = nullOr str;
82+
type = nullOr (separatedString " ");
8383
default = "";
8484
description = ''
8585
Extra arguments to pass to `cabal v2-configure`.
@@ -90,7 +90,7 @@ in {
9090
'';
9191
};
9292
sha256map = mkOption {
93-
type = nullOr unspecified;
93+
type = nullOr (attrsOf (either str (attrsOf str)));
9494
default = null;
9595
description = ''
9696
An alternative to adding `--sha256` comments into the

0 commit comments

Comments
 (0)