Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shellFor doesn't seem to respect cabal.project(.local) #2304

Open
spacekitteh opened this issue Jan 10, 2025 · 1 comment
Open

shellFor doesn't seem to respect cabal.project(.local) #2304

spacekitteh opened this issue Jan 10, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@spacekitteh
Copy link

I need some package bounds overriden in my cabal.project, and while it works with nix build, it seems that shellFor does not pick up the overriden constraints.

As an example, try doing nix develop git+https://gitlab.com/spacekitteh/spacerl.git?ref=master&rev=5f55424af741e89ab08f788695fff8394f2db8b7

and then try nix build instead.

@TeofilC
Copy link
Contributor

TeofilC commented Jan 29, 2025

I'm not sure if I can reproduce this with 5f55424af741e89ab08f788695fff8394f2db8b7. Running nix develop and then cabal build all seems to mostly work fine. I'm getting an error from ld linking dear-imgui into sdlapp. Is that the expected issue?

With 891fdef5cfae6eb1f13dde9a0cd646559474bdf0 (the current commit), I am seeing a failure when running nix develop.
It looks like haskell.nix is failing to find a build plan for hoogle with ghc-9.12.
Hoogle is enabled by default in shells, and disabling it seems to fix the shell.

This is the workaround patch I've applied:

diff --git a/flake.nix b/flake.nix
index 0731286..702f350 100644
--- a/flake.nix
+++ b/flake.nix
@@ -74,7 +74,7 @@
         in
         flake
         // {
-          devShells.default = pkgs.startingOver.shellFor { buildInputs = [ pkgs.startingOver.roots ]; };
+          devShells.default = pkgs.startingOver.shellFor { buildInputs = [ pkgs.startingOver.roots ]; withHoogle = false; };
           formatter = pkgs.nixfmt-rfc-style;
           # Built by `nix build .`
           packages.default = flake.packages."starting-over:exe:ttyapp";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants