-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
pythonPackages.moderngl: init at 5.5.0 #54737
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.
Ran 0 tests in 0.000s
Plase add an appropriate checkPhase
or - if there are no tests - set doCheck = false
and add a comment with the reason.
Thanks for reviewing! Good catch about the missing tests, hadn't noticed that. The PyPi tarball/zip apparently doesn't contain any tests. Digging a bit deeper I found this closed merge request: #40767 I tried that route (fetching sources from github and explicitly running pytest) but that gave me the same error as @PsyanticY I'm not 100% sure, but I think the library can't run without a X display. Seems logical since the library probably tries to run some OpenGL commands on the GPU. My conclusion is that this library is not testable in the nix build environment. Does that reasoning make sense? Is it okay to skip tests for this reason? I have tested the library by running the examples from the ModernGL github. |
Ping @dotlambda I've made the changes you requested. |
@GrahamcOfBorg build python3.pkgs.moderngl |
It is. |
|
||
disabled = !isPy3k; | ||
|
||
buildInputs = [ libGLU_combined libX11 ]; |
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.
In https://aur.archlinux.org/packages/python-moderngl-git/, they only use libGL
. What did you infer these dependencies from?
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.
Tried a build without libX11
and it crashed with:
/nix/store/34kliyybc28hydrxv4f7l0h9p6wm6dhp-libGLU-combined/include/GL/glx.h:30:10: fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
^~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
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.
Alright, I get the same. However, you should replace libGLU_combined
by libGL
or is there a reason not to?
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.
And we should mark it as broken on Darwin as long as that doesn't work.
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.
Tested it with libGL
and that works just fine. I've removed Darwin from the platforms, added a comment that it is broken on that platform.
@GrahamcOfBorg build python3.pkgs.moderngl |
Thanks for reviewing @dotlambda! |
Motivation for this change
Library is missing from Nixpkgs.
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)