diff options
author | OPNA2608 <christoph.neidahl@gmail.com> | 2023-08-25 18:58:21 +0200 |
---|---|---|
committer | OPNA2608 <opna2608@protonmail.com> | 2024-01-14 19:51:17 +0100 |
commit | 60c8b2e2339e25add195e0cdcc4989f5208726bf (patch) | |
tree | 1bde686ee06c609126b1f5c497972feaff70f842 /pkgs/games | |
parent | 1fb2556e994c3e549deea0330a2f72373d190a05 (diff) | |
download | nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.tar nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.tar.gz nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.tar.bz2 nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.tar.lz nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.tar.xz nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.tar.zst nixlib-60c8b2e2339e25add195e0cdcc4989f5208726bf.zip |
openxray: Enable on Darwin
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/openxray/default.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix index fde0e2eedf9c..8751de6835fb 100644 --- a/pkgs/games/openxray/default.nix +++ b/pkgs/games/openxray/default.nix @@ -51,10 +51,18 @@ stdenv.mkDerivation (finalAttrs: { cmakeBuildType = "RelWithDebInfo"; dontStrip = true; + makeWrapperArgs = lib.optionals stdenv.hostPlatform.isLinux [ + # Needed because of dlopen module loading code + "--prefix LD_LIBRARY_PATH : $out/lib" + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Because we work around https://github.com/OpenXRay/xray-16/issues/1224 by using GCC, + # we need a followup workaround for Darwin locale stuff when using GCC: + # runtime error: locale::facet::_S_create_c_locale name not valid + "--run 'export LC_ALL=C'" + ]; + postInstall = '' - # needed because of SDL_LoadObject library loading code - wrapProgram $out/bin/xr_3da \ - --prefix LD_LIBRARY_PATH : $out/lib + wrapProgram $out/bin/xr_3da ${toString finalAttrs.makeWrapperArgs} ''; meta = with lib; { @@ -65,6 +73,6 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/OpenXRay/xray-16/blob/${version}/License.txt"; }; maintainers = with maintainers; [ OPNA2608 ]; - platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; + platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; }; }) |