nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 SDL,
4 fetchFromGitHub,
5 giflib,
6 libXpm,
7 libjpeg,
8 libpng,
9 libtiff,
10 libwebp,
11 pkg-config,
12 stdenv,
13 unstableGitUpdater,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 pname = "SDL_image";
18 version = "1.2.12-unstable-2025-11-06";
19
20 src = fetchFromGitHub {
21 owner = "libsdl-org";
22 repo = "SDL_image";
23 rev = "7c6ea40bb75262740cd07f7658bc543f13c65b3c";
24 hash = "sha256-V8d9En6fJArslFLIaeCdfVD5YoHPbKjOpR79Va8w8js=";
25 };
26
27 configureFlags = [
28 # Disable dynamic loading or else dlopen will fail because of no proper
29 # rpath
30 (lib.enableFeature false "jpg-shared")
31 (lib.enableFeature false "png-shared")
32 (lib.enableFeature false "tif-shared")
33 (lib.enableFeature false "webp-shared")
34 (lib.enableFeature (!stdenv.hostPlatform.isDarwin) "sdltest")
35 ];
36
37 nativeBuildInputs = [
38 SDL
39 pkg-config
40 ];
41
42 buildInputs = [
43 SDL
44 giflib
45 libXpm
46 libjpeg
47 libpng
48 libtiff
49 libwebp
50 ];
51
52 outputs = [
53 "out"
54 "dev"
55 ];
56
57 strictDeps = true;
58
59 passthru.updateScript = unstableGitUpdater {
60 tagFormat = "release-1.*";
61 tagPrefix = "release-";
62 branch = "SDL-1.2";
63 };
64
65 meta = {
66 homepage = "http://www.libsdl.org/projects/SDL_image/";
67 description = "SDL image library";
68 license = lib.licenses.zlib;
69 teams = [ lib.teams.sdl ];
70 inherit (SDL.meta) platforms;
71 };
72})