{ lib, SDL, fetchFromGitHub, giflib, libXpm, libjpeg, libpng, libtiff, libwebp, pkg-config, stdenv, unstableGitUpdater, }: stdenv.mkDerivation (finalAttrs: { pname = "SDL_image"; version = "1.2.12-unstable-2025-11-06"; src = fetchFromGitHub { owner = "libsdl-org"; repo = "SDL_image"; rev = "7c6ea40bb75262740cd07f7658bc543f13c65b3c"; hash = "sha256-V8d9En6fJArslFLIaeCdfVD5YoHPbKjOpR79Va8w8js="; }; configureFlags = [ # Disable dynamic loading or else dlopen will fail because of no proper # rpath (lib.enableFeature false "jpg-shared") (lib.enableFeature false "png-shared") (lib.enableFeature false "tif-shared") (lib.enableFeature false "webp-shared") (lib.enableFeature (!stdenv.hostPlatform.isDarwin) "sdltest") ]; nativeBuildInputs = [ SDL pkg-config ]; buildInputs = [ SDL giflib libXpm libjpeg libpng libtiff libwebp ]; outputs = [ "out" "dev" ]; strictDeps = true; passthru.updateScript = unstableGitUpdater { tagFormat = "release-1.*"; tagPrefix = "release-"; branch = "SDL-1.2"; }; meta = { homepage = "http://www.libsdl.org/projects/SDL_image/"; description = "SDL image library"; license = lib.licenses.zlib; teams = [ lib.teams.sdl ]; inherit (SDL.meta) platforms; }; })