Skip to content

Commit 486984a

Browse files
committed
Fix for unit tests
1 parent 30d4ff1 commit 486984a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/cabal-project-parser.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ let
138138
if sha256map != null
139139
then sha256map.${attrs.url} or null
140140
else null);
141-
in rec {
142-
# This is `some-name` from the `repository some-name` line in the `cabal.project` file.
143-
name = builtins.unsafeDiscardStringContext (__head lines);
144141
addContext = s:
145142
let storeDirMatch = builtins.match ".*(${builtins.storeDir}/[^/]+).*" s;
146143
in if storeDirMatch == null
147144
then s
148145
else builtins.appendContext s { ${builtins.head storeDirMatch} = { path = true; }; };
149146
# The $HOME/.cabal/packages/${name} after running `cabal v2-update` to download the repository
147+
in rec {
148+
# This is `some-name` from the `repository some-name` line in the `cabal.project` file.
149+
name = builtins.unsafeDiscardStringContext (__head lines);
150150
repoContents = if inputMap ? ${attrs.url}
151151
# If there is an input use it to make `file:` url and create a suitable `.cabal/packages/${name}` directory
152152
then evalPackages.runCommand name ({

0 commit comments

Comments
 (0)