about summary refs log tree commit diff
path: root/pkgs/applications/video/kodi/default.nix
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2021-03-02 20:23:37 -0500
committerAaron Andersen <aaron@fosslib.net>2021-03-02 20:23:37 -0500
commit6667c07db00d953bf3afb8b5c9cce363641ffad2 (patch)
tree3f9c367133cf915f6837670a432078e5598d9d63 /pkgs/applications/video/kodi/default.nix
parent25c7c6ac31d18285f079f7f8b768588ab3cf94a9 (diff)
downloadnixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.tar
nixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.tar.gz
nixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.tar.bz2
nixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.tar.lz
nixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.tar.xz
nixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.tar.zst
nixlib-6667c07db00d953bf3afb8b5c9cce363641ffad2.zip
kodi: fix build for wayland and gbm
Diffstat (limited to 'pkgs/applications/video/kodi/default.nix')
-rw-r--r--pkgs/applications/video/kodi/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix
index 2de5899aa3e5..0137a916ac4a 100644
--- a/pkgs/applications/video/kodi/default.nix
+++ b/pkgs/applications/video/kodi/default.nix
@@ -231,7 +231,6 @@ in stdenv.mkDerivation {
 
     cmakeFlags = [
       "-DAPP_RENDER_SYSTEM=${if useGbm then "gles" else "gl"}"
-      "-DCORE_PLATFORM_NAME=${lib.concatStringsSep " " kodi_platforms}"
       "-Dlibdvdcss_URL=${libdvdcss.src}"
       "-Dlibdvdnav_URL=${libdvdnav.src}"
       "-Dlibdvdread_URL=${libdvdread.src}"
@@ -251,9 +250,11 @@ in stdenv.mkDerivation {
     # I'm guessing there is a thing waiting to time out
     doCheck = false;
 
-    # Need these tools on the build system when cross compiling,
-    # hacky, but have found no other way.
-    preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    preConfigure = ''
+      cmakeFlagsArray+=("-DCORE_PLATFORM_NAME=${lib.concatStringsSep " " kodi_platforms}")
+    '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+      # Need these tools on the build system when cross compiling,
+      # hacky, but have found no other way.
       CXX=${stdenv.cc.targetPrefix}c++ LD=ld make -C tools/depends/native/JsonSchemaBuilder
       cmakeFlags+=" -DWITH_JSONSCHEMABUILDER=$PWD/tools/depends/native/JsonSchemaBuilder/bin"