Skip to content

Add extraCabal2nixOptions and cabalFlags to packages.<package>#418

Merged
srid merged 5 commits intosrid:masterfrom
np:cabal2nix-extra-flags
Apr 24, 2025
Merged

Add extraCabal2nixOptions and cabalFlags to packages.<package>#418
srid merged 5 commits intosrid:masterfrom
np:cabal2nix-extra-flags

Conversation

@np
Copy link
Copy Markdown
Contributor

@np np commented Apr 20, 2025

Settings such as settings.<package>.cabalFlags happen after cabal2nix which can be too late when the dependencies depend on a flag.

The option packages.<package>.cabalFlags can safely be used instead of settings.<package>.cabalFlags in most situations.

Additionally the option packages.<package>.extraCabal2nixOptions provides a direct access the options given to cabal2nix.

np and others added 4 commits April 20, 2025 10:29
Settings such as `settings.<package>.cabalFlags` happen after
`cabal2nix` which can be too late when the dependencies depend
on a flag.

The option `packages.<package>.cabalFlags` can safely be used instead
of `settings.<package>.cabalFlags` in most situations.

Additionally the option `packages.<package>.extraCabal2nixOptions`
provides a direct access the options given to cabal2nix.
This should make CI pass.
Copy link
Copy Markdown
Owner

@srid srid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @np - thanks for the PR, this is quite an useful feature.

CI is failing with the following. Note that you can run nix run nixpkgs#omnix ci run locally to run CI. If that doesn't work, run nix --accept-flake-config run github:juspay/omnix ci run

image

@srid srid merged commit 4dc3233 into srid:master Apr 24, 2025
31 checks passed
Yashwanth1906 pushed a commit to Yashwanth1906/Haskell-Assignment-Copies that referenced this pull request Dec 18, 2025
Switch to `23.05` version of nixpkgs, because it uses GHC 9.2 *by
default*. We must use the default GHC package set (basePackages),
because the NixOS cache doesn't cache non-default package sets (leading
to the user compiling the universe).

Also, use an older version of haskell-flake that supports our older
nixpkgs. srid/haskell-flake#418 only works with
newer nixpkgs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants