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.pysdl2: init at 0.9.6 #36506
Conversation
@GrahamcOfBorg eval |
Is anything wrong, preventing this from being merged? |
|
||
buildPythonPackage rec { | ||
pname = "PySDL2"; | ||
name = "${pname}-${version}"; |
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.
The name
attribute is added by buildPython*
and should therefore be removed.
# sandboxed. Disable for now. | ||
doCheck = false; | ||
|
||
src = fetchurl { |
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.
fetchPypi
patches = [ ./PySDL2-dll.patch ]; | ||
postPatch = '' | ||
substituteInPlace sdl2/dll.py --replace \ | ||
"DLL(\"SDL2\")" "DLL('${SDL2}/lib/libSDL2.so')" |
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.
stdenv.hostPlatform.extensions.sharedLibrary
instead of .so
.
Thanks for the review, should be fixed now. |
Any issues remaining? |
}; | ||
|
||
# deliberately not in propagated build inputs; the user can decide | ||
# which library he/she wants to include. |
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.
they
''; | ||
|
||
meta = { | ||
description = "PySDL2 is a wrapper around the SDL2 library and as such similar to the discontinued PySDL project. In contrast to PySDL, it has no licensing restrictions, nor does it rely on C code, but uses ctypes instead."; |
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.
The description should be fixed:
https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes
@GrahamcOfBorg build pythonPackages.pysdl2 python3Packages.pysdl2 |
Success on x86_64-linux (full log) Attempted: pythonPackages.pysdl2, python3Packages.pysdl2 Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: pythonPackages.pysdl2, python3Packages.pysdl2 Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: pythonPackages.pysdl2, python3Packages.pysdl2 Partial log (click to expand)
|
Anything else? |
I've fixed the conflicts. Any chance of this being merged? |
Motivation for this change
We have SDL2, but no Python support!
Things done
I commented out the whole
find_package
magic that Python (and PySDL2) does and replaced it by the hard-coded library paths. I hope that's nixpkgs policy.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)