lol

hashlink: add x86_64-darwin compatibility (#193580)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by

logo
Sandro
and committed by
GitHub
423e9cc4 2ee5c2fa

+41 -10
+9 -2
pkgs/development/interpreters/hashlink/default.nix
··· 12 12 , pcre 13 13 , SDL2 14 14 , sqlite 15 + , getconf 15 16 }: 16 17 17 18 stdenv.mkDerivation rec { ··· 43 44 sqlite 44 45 ]; 45 46 47 + nativeBuildInputs = [ getconf ]; 48 + 49 + postFixup = lib.optionalString stdenv.isDarwin '' 50 + install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl 51 + ''; 52 + 46 53 meta = with lib; { 47 54 description = "A virtual machine for Haxe"; 48 55 homepage = "https://hashlink.haxe.org/"; 49 56 license = licenses.mit; 50 - platforms = [ "x86_64-linux" ]; 51 - maintainers = with maintainers; [ iblech locallycompact ]; 57 + platforms = [ "x86_64-linux" "x86_64-darwin" ]; 58 + maintainers = with maintainers; [ iblech locallycompact logo ]; 52 59 }; 53 60 }
+32 -8
pkgs/development/interpreters/hashlink/hashlink.patch
··· 1 - *** a/Makefile 1970-01-01 01:00:01.000000000 +0100 2 - --- b/Makefile 2022-06-21 23:36:10.023460654 +0200 3 - *************** endif 4 - *** 109,110 **** 5 - --- 109,111 ---- 6 - LIBOPENAL = -lopenal 7 - + LIBOPENGL = -lGL 8 - RELEASE_NAME = linux 1 + --- a/Makefile 2 + +++ b/Makefile 3 + @@ -107,6 +107,7 @@ LIBFLAGS += -L/opt/libjpeg-turbo/lib64 4 + endif 5 + 6 + LIBOPENAL = -lopenal 7 + +LIBOPENGL = -lGL 8 + RELEASE_NAME = linux 9 + 10 + endif 11 + --- a/libs/sdl/gl.c 12 + +++ b/libs/sdl/gl.c 13 + @@ -7,7 +7,7 @@ 14 + # include <OpenGLES/ES3/gl.h> 15 + # define HL_GLES 16 + #elif defined(HL_MAC) 17 + -# include <SDL.h> 18 + +# include <SDL2/SDL.h> 19 + # include <OpenGL/gl3.h> 20 + # define glBindImageTexture(...) hl_error("Not supported on OSX") 21 + # define glDispatchCompute(...) hl_error("Not supported on OSX") 22 + --- a/libs/sdl/sdl.c 23 + +++ b/libs/sdl/sdl.c 24 + @@ -7,7 +7,7 @@ 25 + # include <SDL.h> 26 + # include <SDL_syswm.h> 27 + #elif defined(HL_MAC) 28 + -# include <SDL.h> 29 + +# include <SDL2/SDL.h> 30 + #else 31 + # include <SDL2/SDL.h> 32 + #endif