Skip to content

Expose GHC with packages #483

@deemp

Description

@deemp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions