Description
Describe the bug
I'm trying to cross-compile an application to Windows. The application depends on vty-crossplatform, which has some interesting conditionals in its cabal file:
As you can see, it includes a cabal conditional test of os(dragonfly)
.
Now, look at the code generated in hackage.nix
for this package:
As you can see, the generated Nix in hackage.nix
has mapped this to a test of system.isDragonfly
.
This fails for me, and I get an error like this:
error: attribute 'isDragonfly' missing
...
Did you mean isDragonFly?
Additional context
This error is difficult to trigger, since if you're building on Linux or macOS you short-circuit before hitting this test. It only came up when trying to cross-compile.
I couldn't figure out where these system.*
properties are defined. But it appears that the code that generates hackage.nix
is following a simple procedure where it capitalizes the word and adds "is," so os(windows)
-> system.isWindows
and so on.