about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2023-11-04 15:19:17 +0100
committerOPNA2608 <opna2608@protonmail.com>2024-01-14 19:51:17 +0100
commit47c638264b9e7564853cf1998128b3b2eb63013b (patch)
treef025b973fe9239edef86f33d42a6a486a9c73c44 /pkgs/games
parentf853628ae5569d40879d77880026935347930a4b (diff)
downloadnixlib-47c638264b9e7564853cf1998128b3b2eb63013b.tar
nixlib-47c638264b9e7564853cf1998128b3b2eb63013b.tar.gz
nixlib-47c638264b9e7564853cf1998128b3b2eb63013b.tar.bz2
nixlib-47c638264b9e7564853cf1998128b3b2eb63013b.tar.lz
nixlib-47c638264b9e7564853cf1998128b3b2eb63013b.tar.xz
nixlib-47c638264b9e7564853cf1998128b3b2eb63013b.tar.zst
nixlib-47c638264b9e7564853cf1998128b3b2eb63013b.zip
openxray: Simplify wrapping
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/openxray/default.nix21
1 files changed, 9 insertions, 12 deletions
diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix
index 1dbb1a7bf6f4..c7f4e0197a8e 100644
--- a/pkgs/games/openxray/default.nix
+++ b/pkgs/games/openxray/default.nix
@@ -52,20 +52,17 @@ 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 = ''
-    wrapProgram $out/bin/xr_3da ${toString finalAttrs.makeWrapperArgs}
+  # 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
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    wrapProgram $out/bin/xr_3da \
+      --run 'export LC_ALL=C'
   '';
 
+  # dlopens its own libraries, relies on rpath not having its prefix stripped
+  dontPatchELF = true;
+
   passthru.updateScript = gitUpdater { };
 
   meta = with lib; {