about summary refs log tree commit diff
path: root/pkgs/applications/video/kodi/default.nix
diff options
context:
space:
mode:
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"