Add extraCabal2nixOptions and cabalFlags to packages.<package>#418
Merged
srid merged 5 commits intosrid:masterfrom Apr 24, 2025
Merged
Add extraCabal2nixOptions and cabalFlags to packages.<package>#418srid merged 5 commits intosrid:masterfrom
extraCabal2nixOptions and cabalFlags to packages.<package>#418srid merged 5 commits intosrid:masterfrom
Conversation
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.
srid
reviewed
Apr 20, 2025
Owner
srid
left a comment
There was a problem hiding this comment.
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Settings such as
settings.<package>.cabalFlagshappen aftercabal2nixwhich can be too late when the dependencies depend on a flag.The option
packages.<package>.cabalFlagscan safely be used instead ofsettings.<package>.cabalFlagsin most situations.Additionally the option
packages.<package>.extraCabal2nixOptionsprovides a direct access the options given to cabal2nix.