-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Fix haskellPackages.fltkhs #50828
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
Fix haskellPackages.fltkhs #50828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that most of those changes should be made in cabal2nix
to generate a proper Nix expression from the outset rather than to fix it up after the fact.
# linking fails because the build doesn't pull in the libGLU_combined libraries | ||
fltkhs = markBroken super.fltkhs; | ||
fltkhs = let inherit (pkgs.lib) flip foldr; in foldr (f: x: f x) super.fltkhs [ | ||
(flip appendConfigureFlag "-fopengl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please enable this flag in the generator at https://github.com/NixOS/cabal2nix/blob/master/src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs#L14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - NixOS/cabal2nix#388
As requested at NixOS/nixpkgs#50828
The cabal2nix PR should take care of What about |
#50828 makes an effort to fix this package.
OK. I've re-generated the hackage package set in
There are two places that might be relevant: the post-process hooks at https://github.com/NixOS/cabal2nix/blob/master/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs#L72 allow you to modify the generated Nix expression as you see fit, i.e. to fix up insufficient Cabal files. Then there is the "name lookup" code in https://github.com/NixOS/cabal2nix/blob/master/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs which you can extend to make sure cabal2nix maps system library names used in the Cabal file to Nixpkgs names properly. I'm not sure which of the two is more appropriate your this particular use case. Using post-process hooks to add those dependencies is almost certainly going to work fine, though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably a good idea to target haskell-updates
with this PR because it has the newly generated code for hackage-packages.nix
.
The necessary know-how was kindly provided in NixOS/nixpkgs#50828.
The necessary know-how was kindly provided in NixOS/nixpkgs#50828.
I cherry-picked the addition of fltkhs 1.4.x in 0aff1d86800570799ac16912fc3cda9e177ebdb6. The necessary fixes in cabal2nix are in NixOS/cabal2nix@2103989. The updated package set is in 59a8047dcb9916f342cc9c1146ef333d77316bd5. |
#50828 makes an effort to fix this package.
Awesome, thanks for carrying this through to completion. |
As requested at NixOS/nixpkgs#50828
The necessary know-how was kindly provided in NixOS/nixpkgs#50828.
Motivation for this change
haskellPackages.fltkhs
was marked as broken. It apparently requires FLTK >= 1.4 (see deech/fltkhs#93), which we didn't have yet. As far as I can tell, FLTK 1.4 isn't actually released yet, so I didn't think it was appropriate to replace the FLTK 1.3 package that we already have, so I added a new version. This fixes the Haskell package.While I was at it, I also added the dependencies required to enable OpenGL support in fltkhs.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)/cc @deech