lol

Merge pull request #325568 from atorres1985-contrib/sdl2-image-master

SDL2_Image: rework and modernize

authored by

Peder Bergebakken Sundt and committed by
GitHub
a0e6ea95 ff7cfc2d

+102 -63
+73
pkgs/by-name/sd/SDL2_image/package.nix
··· 1 + { 2 + lib, 3 + SDL2, 4 + darwin, 5 + fetchurl, 6 + giflib, 7 + libXpm, 8 + libjpeg, 9 + libpng, 10 + libtiff, 11 + libwebp, 12 + pkg-config, 13 + stdenv, 14 + zlib, 15 + # Boolean flags 16 + ## Darwin headless will hang when trying to run the SDL test program 17 + enableSdltest ? (!stdenv.isDarwin), 18 + }: 19 + 20 + let 21 + inherit (darwin.apple_sdk.frameworks) Foundation; 22 + in 23 + stdenv.mkDerivation (finalAttrs: { 24 + pname = "SDL2_image"; 25 + version = "2.8.2"; 26 + 27 + src = fetchurl { 28 + url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${finalAttrs.version}.tar.gz"; 29 + hash = "sha256-j0hrv7z4Rk3VjJ5dkzlKsCVc5otRxalmqRgkSCCnbdw="; 30 + }; 31 + 32 + nativeBuildInputs = [ 33 + SDL2 34 + pkg-config 35 + ]; 36 + 37 + buildInputs = [ 38 + SDL2 39 + giflib 40 + libXpm 41 + libjpeg 42 + libpng 43 + libtiff 44 + libwebp 45 + zlib 46 + ] ++ lib.optionals stdenv.isDarwin [ Foundation ]; 47 + 48 + configureFlags = [ 49 + # Disable dynamically loaded dependencies 50 + (lib.enableFeature false "jpg-shared") 51 + (lib.enableFeature false "png-shared") 52 + (lib.enableFeature false "tif-shared") 53 + (lib.enableFeature false "webp-shared") 54 + (lib.enableFeature enableSdltest "sdltest") 55 + ] ++ lib.optionals stdenv.isDarwin [ 56 + # Don't use native macOS frameworks 57 + # Caution: do not set this as (!stdenv.isDarwin) since it would be true 58 + # outside Darwin - and ImageIO does not exist outisde Darwin 59 + (lib.enableFeature false "imageio") 60 + ]; 61 + 62 + strictDeps = true; 63 + 64 + enableParallelBuilding = true; 65 + 66 + meta = { 67 + description = "SDL image library"; 68 + homepage = "https://github.com/libsdl-org/SDL_image"; 69 + license = lib.licenses.zlib; 70 + maintainers = lib.teams.sdl.members ++ (with lib.maintainers; [ ]); 71 + platforms = lib.platforms.unix; 72 + }; 73 + })
+14
pkgs/by-name/sd/SDL2_image_2_0/package.nix
··· 1 + # Dependency of pygame, toppler 2 + { 3 + lib, 4 + SDL2_image, 5 + fetchurl, 6 + }: 7 + 8 + SDL2_image.overrideAttrs (oldAttrs: { 9 + version = "2.0.5"; 10 + src = fetchurl { 11 + inherit (oldAttrs.src) url; 12 + hash = "sha256-vdX24CZoL31+G+C2BRsgnaL0AqLdi9HEvZwlrSYxCNA"; 13 + }; 14 + })
+15
pkgs/by-name/sd/SDL2_image_2_6/package.nix
··· 1 + # Dependency for hedgewars: 2 + # https://github.com/NixOS/nixpkgs/pull/274185#issuecomment-1856764786 3 + { 4 + lib, 5 + SDL2_image, 6 + fetchurl, 7 + }: 8 + 9 + SDL2_image.overrideAttrs (oldAttrs: { 10 + version = "2.6.3"; 11 + src = fetchurl { 12 + inherit (oldAttrs.src) url; 13 + hash = "sha256-kxyb5b8dfI+um33BV4KLfu6HTiPH8ktEun7/a0g2MSw="; 14 + }; 15 + })
-42
pkgs/development/libraries/SDL2_image/default.nix
··· 1 - { lib, stdenv, fetchurl 2 - , pkg-config 3 - , SDL2, libpng, libjpeg, libtiff, giflib, libwebp, libXpm, zlib, Foundation 4 - }: 5 - 6 - stdenv.mkDerivation (finalAttrs: { 7 - pname = "SDL2_image"; 8 - version = "2.8.2"; 9 - 10 - src = fetchurl { 11 - url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${finalAttrs.version}.tar.gz"; 12 - hash = "sha256-j0hrv7z4Rk3VjJ5dkzlKsCVc5otRxalmqRgkSCCnbdw="; 13 - }; 14 - 15 - nativeBuildInputs = [ pkg-config ]; 16 - 17 - buildInputs = [ SDL2 libpng libjpeg libtiff giflib libwebp libXpm zlib ] 18 - ++ lib.optional stdenv.isDarwin Foundation; 19 - 20 - configureFlags = [ 21 - # Disable dynamically loaded dependencies 22 - "--disable-jpg-shared" 23 - "--disable-png-shared" 24 - "--disable-tif-shared" 25 - "--disable-webp-shared" 26 - ] ++ lib.optionals stdenv.isDarwin [ 27 - # Darwin headless will hang when trying to run the SDL test program 28 - "--disable-sdltest" 29 - # Don't use native macOS frameworks 30 - "--disable-imageio" 31 - ]; 32 - 33 - enableParallelBuilding = true; 34 - 35 - meta = with lib; { 36 - description = "SDL image library"; 37 - homepage = "http://www.libsdl.org/projects/SDL_image/"; 38 - platforms = platforms.unix; 39 - license = licenses.zlib; 40 - maintainers = with maintainers; [ cpages ]; 41 - }; 42 - })
-21
pkgs/top-level/all-packages.nix
··· 23972 23972 inherit (darwin.apple_sdk.frameworks) AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL; 23973 23973 }; 23974 23974 23975 - SDL2_image = callPackage ../development/libraries/SDL2_image { 23976 - inherit (darwin.apple_sdk.frameworks) Foundation; 23977 - }; 23978 - # Pinned for pygame, toppler 23979 - SDL2_image_2_0 = SDL2_image.overrideAttrs (oldAttrs: { 23980 - version = "2.0.5"; 23981 - src = fetchurl { 23982 - inherit (oldAttrs.src) url; 23983 - hash = "sha256-vdX24CZoL31+G+C2BRsgnaL0AqLdi9HEvZwlrSYxCNA"; 23984 - }; 23985 - }); 23986 - # Pinned for hedgewars: 23987 - # https://github.com/NixOS/nixpkgs/pull/274185#issuecomment-1856764786 23988 - SDL2_image_2_6 = SDL2_image.overrideAttrs (oldAttrs: { 23989 - version = "2.6.3"; 23990 - src = fetchurl { 23991 - inherit (oldAttrs.src) url; 23992 - hash = "sha256-kxyb5b8dfI+um33BV4KLfu6HTiPH8ktEun7/a0g2MSw="; 23993 - }; 23994 - }); 23995 - 23996 23975 sdrplay = callPackage ../applications/radio/sdrplay { }; 23997 23976 23998 23977 sdr-j-fm = libsForQt5.callPackage ../applications/radio/sdr-j-fm { };