From 8a8500c2adadee055ee1b5200ccd492d7e707933 Mon Sep 17 00:00:00 2001 From: Robert Whitaker <__github__@robwhitaker.com> Date: Sat, 29 May 2021 22:17:22 -0400 Subject: [PATCH] godot: 3.2.2 -> 3.3.2 (#123126) Co-authored-by: Sandro --- pkgs/development/tools/godot/default.nix | 17 ++++++++------ .../godot/dont_clobber_environment.patch | 17 +++++++------- .../tools/godot/pkg_config_additions.patch | 23 ++++++++++++------- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/pkgs/development/tools/godot/default.nix b/pkgs/development/tools/godot/default.nix index d5eb7a9b0e01..3a210ab174f9 100644 --- a/pkgs/development/tools/godot/default.nix +++ b/pkgs/development/tools/godot/default.nix @@ -1,27 +1,30 @@ -{ stdenv, lib, fetchFromGitHub, scons, pkg-config, libX11, libXcursor -, libXinerama, libXrandr, libXrender, libpulseaudio ? null -, libXi ? null, libXext, libXfixes, freetype, openssl -, alsaLib, libGLU, zlib, yasm ? null }: +{ stdenv, lib, fetchFromGitHub, scons, pkg-config, udev, libX11 +, libXcursor , libXinerama, libXrandr, libXrender, libpulseaudio +, libXi, libXext, libXfixes, freetype, openssl +, alsaLib, libGLU, zlib, yasm +, withUdev ? true +}: let options = { touch = libXi != null; pulseaudio = false; + udev = withUdev; }; in stdenv.mkDerivation rec { pname = "godot"; - version = "3.2.3"; + version = "3.3.2"; src = fetchFromGitHub { owner = "godotengine"; repo = "godot"; rev = "${version}-stable"; - sha256 = "19vrp5lhyvxbm6wjxzn28sn3i0s8j08ca7nani8l1nrhvlc8wi0v"; + sha256 = "0rfm6sbbwzvsn76a8aqagd7cqdzmk8qxphgl89k7y982l9a5sz50"; }; nativeBuildInputs = [ pkg-config ]; buildInputs = [ - scons libX11 libXcursor libXinerama libXrandr libXrender + scons udev libX11 libXcursor libXinerama libXrandr libXrender libXi libXext libXfixes freetype openssl alsaLib libpulseaudio libGLU zlib yasm ]; diff --git a/pkgs/development/tools/godot/dont_clobber_environment.patch b/pkgs/development/tools/godot/dont_clobber_environment.patch index b7c1d3d62335..74e1241513ba 100644 --- a/pkgs/development/tools/godot/dont_clobber_environment.patch +++ b/pkgs/development/tools/godot/dont_clobber_environment.patch @@ -1,18 +1,19 @@ diff --git a/SConstruct b/SConstruct -index b3d033dc90..04b8dcc832 100644 +index d138c7b250..c925bf908e 100644 --- a/SConstruct +++ b/SConstruct -@@ -62,10 +62,9 @@ elif platform_arg == "javascript": - custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"] - +@@ -65,10 +65,10 @@ elif platform_arg == "javascript": + # want to have to pull in manually. + # Then we prepend PATH to make it take precedence, while preserving SCons' own entries. env_base = Environment(tools=custom_tools) --if "TERM" in os.environ: +-env_base.PrependENVPath("PATH", os.getenv("PATH")) +-env_base.PrependENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH")) +-if "TERM" in os.environ: # Used for colored output. - env_base["ENV"]["TERM"] = os.environ["TERM"] --env_base.AppendENVPath("PATH", os.getenv("PATH")) --env_base.AppendENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH")) +for k in ("TERM", "PATH", "PKG_CONFIG_PATH"): + if (k in os.environ): + env_base["ENV"][k] = os.environ[k] ++ + env_base.disabled_modules = [] env_base.use_ptrcall = False - env_base.module_version_string = "" diff --git a/pkgs/development/tools/godot/pkg_config_additions.patch b/pkgs/development/tools/godot/pkg_config_additions.patch index 9e2e5c3536db..f5ab667f1808 100644 --- a/pkgs/development/tools/godot/pkg_config_additions.patch +++ b/pkgs/development/tools/godot/pkg_config_additions.patch @@ -1,11 +1,11 @@ diff --git a/platform/x11/detect.py b/platform/x11/detect.py -index 5674e78350..7051d8e73c 100644 +index 91652aad55..d12389f9f2 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py -@@ -201,6 +201,11 @@ def configure(env): +@@ -218,6 +218,11 @@ def configure(env): env.ParseConfig("pkg-config xrender --cflags --libs") env.ParseConfig("pkg-config xi --cflags --libs") - + + env.ParseConfig("pkg-config xext --cflags --libs") + env.ParseConfig("pkg-config xfixes --cflags --libs") + env.ParseConfig("pkg-config glu --cflags --libs") @@ -13,13 +13,20 @@ index 5674e78350..7051d8e73c 100644 + if env["touch"]: env.Append(CPPDEFINES=["TOUCH_ENABLED"]) - -@@ -299,7 +304,7 @@ def configure(env): + +@@ -323,6 +328,7 @@ def configure(env): print("Enabling ALSA") + env["alsa"] = True env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"]) - # Don't parse --cflags, we don't need to add /usr/include/alsa to include path -- env.ParseConfig("pkg-config alsa --libs") + env.ParseConfig("pkg-config alsa --cflags --libs") else: print("ALSA libraries not found, disabling driver") - + +@@ -340,6 +346,7 @@ def configure(env): + if os.system("pkg-config --exists libudev") == 0: # 0 means found + print("Enabling udev support") + env.Append(CPPDEFINES=["UDEV_ENABLED"]) ++ env.ParseConfig("pkg-config libudev --cflags --libs") + else: + print("libudev development libraries not found, disabling udev support") + else: