Sometimes, I need to write scripts that use Cabal and GHC with all necessary packages. At the same time, I don't want to run the script inside nix develop because I run it in CI and don't want to wait to get all dependencies from the devShell.
Example of the script:
https://github.com/deemp/lima/blob/3eb85c7099ffc46897181b7132666842c8aec8bf/flake.nix#L129-L135
The necessary GHC is present in the haskellProjects config. However, I can get this GHC and add it to the script dependencies only with a crutch:
https://github.com/deemp/lima/blob/3eb85c7099ffc46897181b7132666842c8aec8bf/flake.nix#L118-L122
Therefore, I suggest to add haskellProjects.ghc option that will provide the GHC unless devShell.enable = false.
Sometimes, I need to write scripts that use Cabal and GHC with all necessary packages. At the same time, I don't want to run the script inside
nix developbecause I run it in CI and don't want to wait to get all dependencies from thedevShell.Example of the script:
https://github.com/deemp/lima/blob/3eb85c7099ffc46897181b7132666842c8aec8bf/flake.nix#L129-L135
The necessary GHC is present in the
haskellProjectsconfig. However, I can get this GHC and add it to the script dependencies only with a crutch:https://github.com/deemp/lima/blob/3eb85c7099ffc46897181b7132666842c8aec8bf/flake.nix#L118-L122
Therefore, I suggest to add
haskellProjects.ghcoption that will provide the GHC unlessdevShell.enable = false.