summary refs log tree commit diff
path: root/pkgs/games/warzone2100
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2021-07-03 16:56:42 +0200
committerFrancesco Gazzetta <fgaz@fgaz.me>2021-07-03 16:56:42 +0200
commitb5b5dbb62d959e743742e75ef342ff9fca392ada (patch)
tree3c17be0da0a9c1855ac28fa1838e840cd64deffd /pkgs/games/warzone2100
parent5189f68504d1abe4dae7d32fba765fad3ea0c56a (diff)
downloadnixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.tar
nixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.tar.gz
nixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.tar.bz2
nixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.tar.lz
nixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.tar.xz
nixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.tar.zst
nixpkgs-b5b5dbb62d959e743742e75ef342ff9fca392ada.zip
warzone2100: better fix for absolute bindir
Diffstat (limited to 'pkgs/games/warzone2100')
-rw-r--r--pkgs/games/warzone2100/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix
index 7f2ad875d8c..c3eebf203cb 100644
--- a/pkgs/games/warzone2100/default.nix
+++ b/pkgs/games/warzone2100/default.nix
@@ -84,10 +84,15 @@ stdenv.mkDerivation rec {
   cmakeFlags = [
     "-DWZ_DISTRIBUTOR=NixOS"
     # The cmake builder automatically sets CMAKE_INSTALL_BINDIR to an absolute
-    # path, but this results in an error.
-    # By resetting it, we let the CMakeLists set it to an accepted value
-    # based on prefix.
-    "-DCMAKE_INSTALL_BINDIR="
+    # path, but this results in an error:
+    #
+    # > An absolute CMAKE_INSTALL_BINDIR path cannot be used if the following
+    # > are not also absolute paths: WZ_DATADIR
+    #
+    # WZ_DATADIR is based on CMAKE_INSTALL_DATAROOTDIR, so we set that.
+    #
+    # Alternatively, we could have set CMAKE_INSTALL_BINDIR to "bin".
+    "-DCMAKE_INSTALL_DATAROOTDIR=${placeholder "out"}/share"
   ];
 
   postInstall = lib.optionalString withVideos ''