Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
haskellPackages.GLUT: Fix freeglut.pc -> glut.pc #76073
Motivation for this change
See #70235 (comment)
This was broken by PR #70235 with commit:
The in the newer freeglut version, the pkg-config file is called
Isn't this really a issue with freeglut? If the package is called freeglut but provides libglut and a glut.pc pkgconf file, isn't this inconsistency the issue?
Freeglut has the option of building with the FREEGLUT_REPLACE_GLUT=OFF and produce a freeglut.pc and libfreeglut libraries. Or it can just add to freeglut/default.nix
postFixup = ''
Or (I think) the package could be named glut with a freeglut alias added to nixpkgs. Otherwise I suspect more than just Haskell's GLUT package will have to change, and we have another gratuitous inconsistency between version.
My novice instincts says we should follow Arch Linux's choice to just add the freeglut.pc link.
@barryfm I have nothing against that, but i think my PR is still correct, because the Haskell GLUT package seems to support any GLUT implementation, freeglut or normal glut, so I think it makes sense that the nixpkgs patch makes it search for a general
The authors of the Haskell package, e.g. https://github.com/haskell-opengl/GLUT/issues.
What concerns me is that we have to patch that Cabal file in the first place. Why is that even necessary? It looks to me like upstream should add that dependency to their Cabal file.
@peti, I have compared the 19.09 with unstable, and freeglut going from 3.0.0 to 3.2.1 caused the
This is controlled by freeglut's cmake option FREEGLUT_REPLACE_GLUT defaulting to ON (unless on WIndows). Previously this flag did not trigger this rename.
I'm not sure if NixOS has a policy about such situations, but it would seem to make sense that a uniform way was chosen to deal with package names not being the same than the dependency they provide.
I don't understand how the upstream package can do anything useful without depending on
Am I missing something?
Ok. @turboMaCk has pointed out that the Haskell library contains hacks that load
The relevant code is at https://github.com/haskell-opengl/GLUT/blob/master/cbits/HsGLUT.c.
In the light of this, I don't see a reasonable chance to convince upstream to declare a proper dependency. I guess this means that we can just merge this update and forget about it ... until next time.