sdl3: fix building for static windows

This commit is contained in:
Marcin Serwin
2025-02-11 17:36:34 +01:00
parent a79cfe0ebd
commit d2a61b2dd4
+3 -2
View File
@@ -173,7 +173,8 @@ stdenv.mkDerivation (finalAttrs: {
# Many dependencies are not directly linked to, but dlopen()'d at runtime. Adding them to the RPATH
# helps them be found
NIX_LDFLAGS =
lib.optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so")
lib.optionalString
(stdenv.hostPlatform.hasSharedLibraries && stdenv.hostPlatform.extensions.sharedLibrary == ".so")
"-rpath ${
lib.makeLibraryPath (finalAttrs.dlopenBuildInputs ++ finalAttrs.dlopenPropagatedBuildInputs)
}";
@@ -230,7 +231,7 @@ stdenv.mkDerivation (finalAttrs: {
changelog = "https://github.com/libsdl-org/SDL/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [ getchoo ];
platforms = lib.platforms.unix;
platforms = lib.platforms.unix ++ lib.platforms.windows;
pkgConfigModules = [ "sdl3" ];
};
})