From efab4baa237e30a5ed10cd192707b59d0292246d Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Sun, 19 Jan 2025 12:21:41 +0100 Subject: [PATCH] globulation2: fix strictDeps and trivial cross builds --- pkgs/by-name/gl/globulation2/package.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gl/globulation2/package.nix b/pkgs/by-name/gl/globulation2/package.nix index 229bafdc23a2..f603987a9b06 100644 --- a/pkgs/by-name/gl/globulation2/package.nix +++ b/pkgs/by-name/gl/globulation2/package.nix @@ -66,7 +66,17 @@ stdenv.mkDerivation rec { sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" SConstruct ''; - nativeBuildInputs = [ scons ]; + # fix sdl-config for cross + # TODO: remaining *-config, and make it work for !(build.canExecute host) + preBuild = '' + substituteInPlace SConstruct \ + --replace-fail sdl-config "${lib.getExe' (lib.getDev SDL) "sdl-config"}" + ''; + + nativeBuildInputs = [ + scons + bsdiff # bspatch + ]; buildInputs = [ libGLU libGL @@ -80,7 +90,6 @@ stdenv.mkDerivation rec { libogg boost fribidi - bsdiff ]; sconsFlags = [ @@ -97,6 +106,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; license = licenses.gpl3; + broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; }; passthru.updateInfo.downloadPage = "http://globulation2.org/wiki/Download_and_Install"; }