about summary refs log tree commit diff
path: root/pkgs/games/super-tux-kart
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2021-05-07 21:04:07 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-08 13:52:35 -0700
commitb690ceff5dd2ce5b34d37209f883e575e77b7ec8 (patch)
treec40204dc1eca481570ef4190a231adbac8fba226 /pkgs/games/super-tux-kart
parent97de15956a4d088b1cd42420d4ad7d739327443c (diff)
superTuxKart: Fix aarch64-linux build
Diffstat (limited to 'pkgs/games/super-tux-kart')
-rw-r--r--pkgs/games/super-tux-kart/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/games/super-tux-kart/default.nix b/pkgs/games/super-tux-kart/default.nix
index 35143028a2759..7998e13817d87 100644
--- a/pkgs/games/super-tux-kart/default.nix
+++ b/pkgs/games/super-tux-kart/default.nix
@@ -54,7 +54,12 @@ let
     "libsquish"
     # Not packaged to this date
     "sheenbidi"
-  ];
+  ]
+  # Our system angelscript causes linking error on ARM
+  # ld: libangelscript.so: undefined reference to
+  # `CallSystemFunctionNative(asCContext*, asCScriptFunction*, void*, unsigned int*, void*, unsigned long&, void*)'
+  # Bundled angelscript compiles fine
+  ++ lib.optional stdenv.hostPlatform.isAarch64 "angelscript";
 in
 stdenv.mkDerivation rec {
 
@@ -100,15 +105,15 @@ stdenv.mkDerivation rec {
     harfbuzz
     mcpp
     wiiuse
-    angelscript
-  ];
+  ]
+  ++ lib.optional (!stdenv.hostPlatform.isAarch64) angelscript;
 
   cmakeFlags = [
     "-DBUILD_RECORDER=OFF" # libopenglrecorder is not in nixpkgs
-    "-DUSE_SYSTEM_ANGELSCRIPT=OFF" # doesn't work with 2.31.2 or 2.32.0
+    # doesn't work with our 2.35.0 on aarch64-linux
+    "-DUSE_SYSTEM_ANGELSCRIPT=${if !stdenv.hostPlatform.isAarch64 then "ON" else "OFF"}"
     "-DCHECK_ASSETS=OFF"
     "-DUSE_SYSTEM_WIIUSE=ON"
-    "-DUSE_SYSTEM_ANGELSCRIPT=ON"
     "-DOpenGL_GL_PREFERENCE=GLVND"
   ];