I have a Haskell project and I’m using direnv
with nix-direnv
to provide an environment for building my application. When I run cabal build
in the project directory, I get the following output:
Build profile: -w ghc-9.6.6 -O1
In order, the following will be built (use -v for more details):
- rainbow-hash-ld-0.1.0.0 (lib) (first run)
- rainbow-hash-ld-0.1.0.0 (exe:rainbow-hash-ld) (first run)
Configuring library for rainbow-hash-ld-0.1.0.0...
/tmp/nix-shell-2376382-0: openTempFile: does not exist (No such file or directory)
Error: [Cabal-7125]
Failed to build rainbow-hash-ld-0.1.0.0 (which is required by exe:rainbow-hash-ld from rainbow-hash-ld-0.1.0.0). The failure occurred during the configure step.
Can someone enlighten me as to what the problem might be?
Note that I can build the project using nix-build
when not using direnv
.