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
python3.pkgs.pysdl2: fix build #98300
Conversation
Builds successfully on macos 10.14 & non-nixos linux x86_64. Seems like a slightly better approach than previously. |
substituteInPlace sdl2/dll.py --replace \ | ||
"DLL(\"SDL2\")" "DLL('${SDL2}/lib/libSDL2${stdenv.hostPlatform.extensions.sharedLibrary}')" | ||
"SDL2-path-from-nix" "${SDL2}/lib/libSDL2${stdenv.hostPlatform.extensions.sharedLibrary}" | ||
substituteInPlace sdl2/sdlttf.py --replace \ | ||
"DLL(\"SDL2_ttf\")" "DLL('${SDL2_ttf}/lib/libSDL2_ttf${stdenv.hostPlatform.extensions.sharedLibrary}')" | ||
"SDL2_ttf-path-from-nix" "${SDL2_ttf}/lib/libSDL2_ttf${stdenv.hostPlatform.extensions.sharedLibrary}" | ||
substituteInPlace sdl2/sdlimage.py --replace \ | ||
"DLL(\"SDL2_image\")" "DLL('${SDL2_image}/lib/libSDL2_image${stdenv.hostPlatform.extensions.sharedLibrary}')" | ||
"SDL2_image-path-from-nix" "${SDL2_image}/lib/libSDL2_image${stdenv.hostPlatform.extensions.sharedLibrary}" | ||
substituteInPlace sdl2/sdlgfx.py --replace \ | ||
"DLL(\"SDL2_gfx\")" "DLL('${SDL2_gfx}/lib/libSDL2_gfx${stdenv.hostPlatform.extensions.sharedLibrary}')" | ||
"SDL2_gfx-path-from-nix" "${SDL2_gfx}/lib/libSDL2_gfx${stdenv.hostPlatform.extensions.sharedLibrary}" | ||
substituteInPlace sdl2/sdlmixer.py --replace \ | ||
"DLL(\"SDL2_mixer\")" "DLL('${SDL2_mixer}/lib/libSDL2_mixer${stdenv.hostPlatform.extensions.sharedLibrary}')" | ||
"SDL2_mixer-path-from-nix" "${SDL2_mixer}/lib/libSDL2_mixer${stdenv.hostPlatform.extensions.sharedLibrary}" |
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.
we have a substitueAll
utility that's usually meant for this type of large substitution
example:
06960ac
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.
however, i forgot to post this review like 3 days ago. I think what you have works 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.
I see, that makes for cleaner code. Take a look at the updated commit.
Update patches after version bump.
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.
LGTM
Result of nixpkgs-review pr 98300 1
6 packages built:
- python27Packages.pysdl2
- python27Packages.pytmx
- python37Packages.pysdl2
- python37Packages.pytmx
- python38Packages.pysdl2
- python38Packages.pytmx
Update patches after version bump.
I ran examples bundled with the library and they seem to run okay.
ZHF: #97479
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)