reflex-platform
reflex-platform copied to clipboard
use something other than `default.nix` for `work-on`
default.nix
already has special treatment for nix. The way it is now, the default.nix
for nix and the default.nix
for work-on
are incompatible.
The name doesn't really matter, but I propose cabal.nix
since it's usually the result of cabal2nix
.
The motivating workflow I'd like to support is having a default.nix
usable directly by nix to build the project, pulling dependencies from the cabal file via cabal2nixResult
, and still be able to use work-on
without the (invalid for work-on
) default.nix
taking precedence over the *.cabal
file. This way, the source of truth is the cabal file, which cannot become desynced from the .nix
file. In this case I'm not using the cabal.nix
at all but it remains available for those who want it - maybe I'm missing some benefit of using nix'd cabal deps rather than the cabal file directly.
The issue here is that we just use callPackage. Nix itself checks default.nix if you run callPackage on a directory.
But, I think we should be able to support this use case! We just want to make the *.cabal file have higher priority than the default.nix file.
Possible fix in https://github.com/reflex-frp/reflex-platform/pull/444.