File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -126,17 +126,15 @@ let
126
126
# access to the store is restricted. If origSrc was already in the store
127
127
# you can pass the project in as a string.
128
128
rawCabalProject =
129
- if cabalProject != null
130
- then cabalProject + (
131
- if cabalProjectLocal != null
132
- then ''
133
-
134
- -- Added from cabalProjectLocal argument to cabalProject
135
- ${ cabalProjectLocal }
136
- ''
137
- else ""
138
- )
139
- else null ;
129
+ # Even if `cabal.project` doesn't exist, `cabal.project.local` is still used by cabal.
130
+ # We tested this: https://github.com/input-output-hk/haskell.nix/pull/1588
131
+ if cabalProject == null && cabalProjectLocal == null
132
+ then null
133
+ else (
134
+ # like fmap
135
+ let f = g : x : if x == null then "" else g x ; in
136
+ f ( x : x ) cabalProject + f ( x : "\n -- Added from cabalProjectLocal argument to cabalProject\n ${ x } " ) cabalProjectLocal
137
+ ) ;
140
138
141
139
cabalProjectIndexState =
142
140
if rawCabalProject != null
Original file line number Diff line number Diff line change 26
26
# Avoid readDir and readFile IFD functions looking for these files in the hackage source
27
27
# `mkOverride 1100` means this will be used in preference to the mkOption default,
28
28
# but a `mkDefault` can still override this.
29
- cabalProject = lib . mkOverride 1100 ''
30
- packages: .
31
- '' ;
32
29
cabalProjectLocal = lib . mkOverride 1100 null ;
33
30
cabalProjectFreeze = lib . mkOverride 1100 null ;
34
31
src =
You can’t perform that action at this time.
0 commit comments