-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Expose SDL2 as sdl2 in pkgconfig to maintian consistency with other distros #141523
Comments
Looking at https://archlinux.org/packages/extra/x86_64/sdl2/ and the "Package Contents" section, it seems like Arch Linux also uses And judging from the Windows MinGW development library on https://libsdl.org/download-2.0.php, it seems like the upstream uses $ ls -lA SDL2-2.0.16/x86_64-w64-mingw32/lib
total 15064
drwxr-xr-x 3 plumeus plumeus 18 Oct 14 01:48 cmake
-rw-r--r-- 1 plumeus plumeus 14293518 Aug 11 00:54 libSDL2.a
-rwxr-xr-x 1 plumeus plumeus 483488 Aug 11 00:54 libSDL2.dll.a
-rwxr-xr-x 1 plumeus plumeus 1058 Aug 11 00:54 libSDL2.la
-rw-r--r-- 1 plumeus plumeus 616058 Aug 11 00:54 libSDL2_test.a
-rwxr-xr-x 1 plumeus plumeus 925 Aug 11 00:54 libSDL2_test.la
-rw-r--r-- 1 plumeus plumeus 9422 Aug 11 00:54 libSDL2main.a
-rwxr-xr-x 1 plumeus plumeus 922 Aug 11 00:54 libSDL2main.la
drwxr-xr-x 2 plumeus plumeus 21 Oct 14 01:48 pkgconfig I haven't checked how other distros deal with this, but I think having it in uppercase should be perfectly reasonable. |
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
buildInputs = with pkgs; [
SDL2
pkg-config
];
} Using this However, Edit: For clarity, I'm using the master branch of Zig, and not |
Yes, you're right! Changing |
I find it strange that |
Describe the bug
I was attempting to use this zig wrapper for SDL, and compilation failed because ld couldn't find
sdl2
. At first, I thought this was because of #24744, however, after changing the build script to useSDL2
instead ofsdl2
, it worked. I assume the library usedsdl2
because it is how every other distro exposes the library, and I don't see a reason why Nix needs to change this.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The line
exe.linkSystemLibrary("sdl2");
is able to find SDL2.Notify maintainers
@cpages
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: