Loading pkgs/by-name/op/openjk/package.nix +69 −27 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ stdenv.mkDerivation { outputs = [ "out" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "openjo" "openja" ]; Loading @@ -83,9 +85,16 @@ stdenv.mkDerivation { "-DBuildJK2SPEngine:BOOL=ON" "-DBuildJK2SPGame:BOOL=ON" "-DBuildJK2SPRdVanilla:BOOL=ON" ] # Otherwise will fall with `not found <fp.h>` ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DUseInternalJPEG:BOOL=OFF" "-DUseInternalPNG:BOOL=OFF" ]; postInstall = '' postInstall = if stdenv.hostPlatform.isLinux then '' mkdir -p $out/bin $openja/bin $openjo/bin mkdir -p $openja/share/applications $openjo/share/applications mkdir -p $openja/share/icons/hicolor/128x128/apps $openjo/share/icons/hicolor/128x128/apps Loading @@ -108,15 +117,48 @@ stdenv.mkDerivation { ln -s $openja/bin/* $out/bin ln -s $openjo/bin/* $out/bin rm -rf $out/opt '' else if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications $out/bin mv $out/opt/JediOutcast/openjo_sp.*.app $out/Applications/openjo_sp.app mv $out/opt/JediAcademy/openjk.*.app $out/Applications/openjk.app mv $out/opt/JediAcademy/openjk_sp.*.app $out/Applications/openjk_sp.app mv $out/opt/JediAcademy/openjkded.* $out/bin/openjkded rm -rf $out/opt makeWrapper $out/Applications/openjk.app/Contents/MacOS/openjk.* $out/bin/openjk \ --chdir $out/Applications/openjk.app/Contents/MacOS/ makeWrapper $out/Applications/openjk_sp.app/Contents/MacOS/openjk_sp.* $out/bin/openjk_sp \ --chdir $out/Applications/openjk_sp.app/Contents/MacOS/ makeWrapper $out/Applications/openjo_sp.app/Contents/MacOS/openjo_sp.* $out/bin/openjo_sp \ --chdir $out/Applications/openjo_sp.app/Contents/MacOS/ '' else throw "unsupported system"; # CMake is copying libraries, but their links are needed postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' for app in openjk openjk_sp openjo_sp; do pushd $out/Applications/$app.app/Contents/Frameworks/ rm *.dylib ln -s ${SDL2}/lib/libSDL2.dylib libSDL2-2.0.0.dylib ln -s ${zlib}/lib/libz.dylib libz.dylib popd done ''; passthru.updateScript = unstableGitUpdater { }; meta = with lib; { meta = { description = "Open-source engine for Star Wars Jedi Academy game"; homepage = "https://github.com/JACoders/OpenJK"; license = licenses.gpl2Only; platforms = platforms.linux; maintainers = [ ]; license = lib.licenses.gpl2Only; platforms = with lib.platforms; linux ++ darwin; maintainers = with lib.maintainers; [ r4v3n6101 ]; }; } Loading
pkgs/by-name/op/openjk/package.nix +69 −27 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ stdenv.mkDerivation { outputs = [ "out" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "openjo" "openja" ]; Loading @@ -83,9 +85,16 @@ stdenv.mkDerivation { "-DBuildJK2SPEngine:BOOL=ON" "-DBuildJK2SPGame:BOOL=ON" "-DBuildJK2SPRdVanilla:BOOL=ON" ] # Otherwise will fall with `not found <fp.h>` ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DUseInternalJPEG:BOOL=OFF" "-DUseInternalPNG:BOOL=OFF" ]; postInstall = '' postInstall = if stdenv.hostPlatform.isLinux then '' mkdir -p $out/bin $openja/bin $openjo/bin mkdir -p $openja/share/applications $openjo/share/applications mkdir -p $openja/share/icons/hicolor/128x128/apps $openjo/share/icons/hicolor/128x128/apps Loading @@ -108,15 +117,48 @@ stdenv.mkDerivation { ln -s $openja/bin/* $out/bin ln -s $openjo/bin/* $out/bin rm -rf $out/opt '' else if stdenv.hostPlatform.isDarwin then '' mkdir -p $out/Applications $out/bin mv $out/opt/JediOutcast/openjo_sp.*.app $out/Applications/openjo_sp.app mv $out/opt/JediAcademy/openjk.*.app $out/Applications/openjk.app mv $out/opt/JediAcademy/openjk_sp.*.app $out/Applications/openjk_sp.app mv $out/opt/JediAcademy/openjkded.* $out/bin/openjkded rm -rf $out/opt makeWrapper $out/Applications/openjk.app/Contents/MacOS/openjk.* $out/bin/openjk \ --chdir $out/Applications/openjk.app/Contents/MacOS/ makeWrapper $out/Applications/openjk_sp.app/Contents/MacOS/openjk_sp.* $out/bin/openjk_sp \ --chdir $out/Applications/openjk_sp.app/Contents/MacOS/ makeWrapper $out/Applications/openjo_sp.app/Contents/MacOS/openjo_sp.* $out/bin/openjo_sp \ --chdir $out/Applications/openjo_sp.app/Contents/MacOS/ '' else throw "unsupported system"; # CMake is copying libraries, but their links are needed postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' for app in openjk openjk_sp openjo_sp; do pushd $out/Applications/$app.app/Contents/Frameworks/ rm *.dylib ln -s ${SDL2}/lib/libSDL2.dylib libSDL2-2.0.0.dylib ln -s ${zlib}/lib/libz.dylib libz.dylib popd done ''; passthru.updateScript = unstableGitUpdater { }; meta = with lib; { meta = { description = "Open-source engine for Star Wars Jedi Academy game"; homepage = "https://github.com/JACoders/OpenJK"; license = licenses.gpl2Only; platforms = platforms.linux; maintainers = [ ]; license = lib.licenses.gpl2Only; platforms = with lib.platforms; linux ++ darwin; maintainers = with lib.maintainers; [ r4v3n6101 ]; }; }