summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeiser Fernández Gallo <leiserfg@gmail.com>2022-08-19 22:06:25 +0200
committerGitHub <noreply@github.com>2022-08-19 22:06:25 +0200
commitae978f07c5a6d187ed4a69616292e791306f7008 (patch)
tree5ced97db813f3fbef608f43b596978b8d9abda87
parentcfe12e8c8a43a5fe5d8c13cdb97cb2ab0a20c847 (diff)
downloadnixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.tar
nixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.tar.gz
nixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.tar.bz2
nixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.tar.lz
nixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.tar.xz
nixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.tar.zst
nixpkgs-ae978f07c5a6d187ed4a69616292e791306f7008.zip
godot: 3.4.4 -> 3.5 (#186692)
Co-authored-by: matthewcroughan <matt@croughan.sh>
-rw-r--r--pkgs/development/tools/godot/default.nix11
-rw-r--r--pkgs/development/tools/godot/pkg_config_additions.patch25
2 files changed, 21 insertions, 15 deletions
diff --git a/pkgs/development/tools/godot/default.nix b/pkgs/development/tools/godot/default.nix
index 1bf38bbacf3..dcf7a6219c4 100644
--- a/pkgs/development/tools/godot/default.nix
+++ b/pkgs/development/tools/godot/default.nix
@@ -16,6 +16,8 @@
 , freetype
 , openssl
 , alsa-lib
+, alsa-plugins
+, makeWrapper
 , libGLU
 , zlib
 , yasm
@@ -31,16 +33,16 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "godot";
-  version = "3.4.4";
+  version = "3.5";
 
   src = fetchFromGitHub {
     owner = "godotengine";
     repo = "godot";
     rev = "${version}-stable";
-    sha256 = "sha256-3AESLzqozi7Fc80u8Ml3ergZMkIhHy4tNlRe/3FsE6k=";
+    sha256 = "sha256-aU5cTiz7OaM0fsv0EzJDUA1Es+Ei63CKLE6GVspJexc=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [
     scons
     udev
@@ -91,6 +93,9 @@ stdenv.mkDerivation rec {
     cp icon.png "$out/share/icons/godot.png"
     substituteInPlace "$out/share/applications/org.godotengine.Godot.desktop" \
       --replace "Exec=godot" "Exec=$out/bin/godot"
+
+    makeWrapper $out/bin/godot $out/bin/godot \
+      --set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib
   '';
 
   meta = with lib; {
diff --git a/pkgs/development/tools/godot/pkg_config_additions.patch b/pkgs/development/tools/godot/pkg_config_additions.patch
index f5ab667f180..23506a604a9 100644
--- a/pkgs/development/tools/godot/pkg_config_additions.patch
+++ b/pkgs/development/tools/godot/pkg_config_additions.patch
@@ -1,32 +1,33 @@
 diff --git a/platform/x11/detect.py b/platform/x11/detect.py
-index 91652aad55..d12389f9f2 100644
+index 98c9ddb..0cc2bff 100644
 --- a/platform/x11/detect.py
 +++ b/platform/x11/detect.py
-@@ -218,6 +218,11 @@ def configure(env):
+@@ -255,6 +255,10 @@ 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")
 +    env.ParseConfig("pkg-config zlib --cflags --libs")
 +
      if env["touch"]:
          env.Append(CPPDEFINES=["TOUCH_ENABLED"])
-
-@@ -323,6 +328,7 @@ def configure(env):
-         print("Enabling ALSA")
+ 
+@@ -359,7 +363,7 @@ def configure(env):
+     if os.system("pkg-config --exists alsa") == 0:  # 0 means found
          env["alsa"] = True
          env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
+-        env.ParseConfig("pkg-config alsa --cflags")  # Only cflags, we dlopen the library.
 +        env.ParseConfig("pkg-config alsa --cflags --libs")
      else:
-         print("ALSA libraries not found, disabling driver")
-
-@@ -340,6 +346,7 @@ def configure(env):
+         print("Warning: ALSA libraries not found. Disabling the ALSA audio driver.")
+ 
+@@ -375,7 +379,7 @@ def configure(env):
+         if env["udev"]:
              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")  # Only cflags, we dlopen the library.
 +                env.ParseConfig("pkg-config libudev --cflags --libs")
              else:
-                 print("libudev development libraries not found, disabling udev support")
+                 print("Warning: libudev development libraries not found. Disabling controller hotplugging support.")
      else: