mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
SDL_compat: init at 1.2.52
This commit is contained in:
parent
5d60882a1e
commit
73a4c001d4
52
pkgs/development/libraries/SDL_compat/default.nix
Normal file
52
pkgs/development/libraries/SDL_compat/default.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, SDL2
|
||||||
|
, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
|
||||||
|
, openglSupport ? libGLSupported
|
||||||
|
, libGL
|
||||||
|
, libGLU
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) optionals makeLibraryPath;
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "SDL_compat";
|
||||||
|
version = "1.2.52";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "libsdl-org";
|
||||||
|
repo = "sdl12-compat";
|
||||||
|
rev = "release-" + version;
|
||||||
|
hash = "sha256-PDGlMI8q74JaqMQ5oX9Zt5CEr7frFQWECbuwq5g25eg=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ SDL2 ]
|
||||||
|
++ optionals openglSupport [ libGL libGLU ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
setupHook = ../SDL/setup-hook.sh;
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
for lib in $out/lib/*.so* ; do
|
||||||
|
if [[ -L "$lib" ]]; then
|
||||||
|
patchelf --set-rpath "$(patchelf --print-rpath $lib):${makeLibraryPath propagatedBuildInputs}" "$lib"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A cross-platform multimedia library - build SDL 1.2 applications against 2.0";
|
||||||
|
homepage = "https://www.libsdl.org/";
|
||||||
|
license = licenses.zlib;
|
||||||
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
@ -20436,13 +20436,17 @@ with pkgs;
|
|||||||
autoreconfHook = buildPackages.autoreconfHook269;
|
autoreconfHook = buildPackages.autoreconfHook269;
|
||||||
};
|
};
|
||||||
|
|
||||||
SDL = callPackage ../development/libraries/SDL ({
|
SDL_classic = callPackage ../development/libraries/SDL ({
|
||||||
inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa GLUT;
|
inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa GLUT;
|
||||||
} // lib.optionalAttrs stdenv.hostPlatform.isAndroid {
|
} // lib.optionalAttrs stdenv.hostPlatform.isAndroid {
|
||||||
# libGLU doesn’t work with Android’s SDL
|
# libGLU doesn’t work with Android’s SDL
|
||||||
libGLU = null;
|
libGLU = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
SDL_compat = callPackage ../development/libraries/SDL_compat { };
|
||||||
|
|
||||||
|
SDL = SDL_classic;
|
||||||
|
|
||||||
SDL_audiolib = callPackage ../development/libraries/SDL_audiolib { };
|
SDL_audiolib = callPackage ../development/libraries/SDL_audiolib { };
|
||||||
|
|
||||||
SDL_sixel = callPackage ../development/libraries/SDL_sixel { };
|
SDL_sixel = callPackage ../development/libraries/SDL_sixel { };
|
||||||
|
Loading…
Reference in New Issue
Block a user