From patchwork Sun May 19 16:16:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 27698 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9739C27BBE9; Sun, 19 May 2024 17:17:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AF66827BBE2 for ; Sun, 19 May 2024 17:17:40 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8jDY-0000ix-3V; Sun, 19 May 2024 12:17:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8jDW-0000iP-Aa for guix-patches@gnu.org; Sun, 19 May 2024 12:16:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8jDW-00034D-1p for guix-patches@gnu.org; Sun, 19 May 2024 12:16:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8jDZ-0003Af-Pj for guix-patches@gnu.org; Sun, 19 May 2024 12:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71067] [PATCH 1/2] gnu: godot-lts: Update to 3.5.3. References: <20240519145601.9772-1-ngraves@ngraves.fr> In-Reply-To: <20240519145601.9772-1-ngraves@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 May 2024 16:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71067 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71067@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 71067-submit@debbugs.gnu.org id=B71067.171613538912151 (code B ref 71067); Sun, 19 May 2024 16:17:01 +0000 Received: (at 71067) by debbugs.gnu.org; 19 May 2024 16:16:29 +0000 Received: from localhost ([127.0.0.1]:36903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8jD3-00039v-Bd for submit@debbugs.gnu.org; Sun, 19 May 2024 12:16:29 -0400 Received: from 10.mo583.mail-out.ovh.net ([46.105.52.148]:46595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8jD0-00039p-7V for 71067@debbugs.gnu.org; Sun, 19 May 2024 12:16:27 -0400 Received: from director9.ghost.mail-out.ovh.net (unknown [10.109.139.16]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 4Vj5RS2C4Rz1Kq0 for <71067@debbugs.gnu.org>; Sun, 19 May 2024 16:16:20 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-gfw8h (unknown [10.110.168.145]) by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 13BE71FD41; Sun, 19 May 2024 16:16:20 +0000 (UTC) Received: from ngraves.fr ([37.59.142.102]) by ghost-submission-6684bf9d7b-gfw8h with ESMTPSA id FQICAtQlSma3dAsA5uFiZg (envelope-from ); Sun, 19 May 2024 16:16:20 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-102R0044248e9cd-84b2-4c29-b259-2727217d6e97, 8F9042FB94FE21B7310FA1A939C635510802798D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Sun, 19 May 2024 18:16:05 +0200 Message-ID: <20240519161612.700-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Ovh-Tracer-Id: 2725803676589613794 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdehkedgleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejuddtieejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeefpdhmohguvgepshhmthhpohhuth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/game-development.scm (godot-lts): Update to 3.5.3. [arguments]<#:scons>: Update to scons-python. Remove argument. <#:phases>: Rename phase 'wrap to 'wrap-ld-path, remove mesa-related comment that seems to be fixed. [inputs]: Replace freetype by freetype-with-brotli. Change-Id: Ia83bc33bd0b944342ba413b46f0963d3f2197bf5 --- gnu/packages/game-development.scm | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 5b7852c4eb9..9591fae7f9e 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1927,7 +1927,7 @@ (define-public openmw (define-public godot-lts (package (name "godot") - (version "3.4.2") + (version "3.5.3") (source (origin (method git-fetch) (uri (git-reference @@ -1936,7 +1936,7 @@ (define-public godot-lts (file-name (git-file-name name version)) (sha256 (base32 - "1bm9yl995chvx6jwkdia12yjrgwcpzb1r9bmj606q8z264aw2ma5")) + "0zibc6am9axbbm8l57jf2d324a2m44pf6ncp2i4h1b219jjq89l6")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) @@ -1948,7 +1948,6 @@ (define-public godot-lts (with-directory-excursion "thirdparty" (let* ((preserved-files '("README.md" - "assimp" "certs" "cvtt" "embree" @@ -1966,6 +1965,7 @@ (define-public godot-lts "oidn" "pvrtccompressor" "recastnavigation" + "rvo2" "squish" "stb_rect_pack" "tinyexr" @@ -1977,8 +1977,7 @@ (define-public godot-lts (cons* "." ".." preserved-files))))))))) (build-system scons-build-system) (arguments - `(#:scons ,scons-python2 - #:scons-flags (list "platform=x11" "target=release_debug" + `(#:scons-flags (list "platform=x11" "target=release_debug" ;; Avoid using many of the bundled libs. ;; Note: These options can be found in the SConstruct file. "builtin_bullet=no" @@ -2032,18 +2031,13 @@ (define-public godot-lts ;; Tell the editor where to find zenity for OS.alert(). (wrap-program (string-append out "/bin/godot") `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) - (add-after 'install 'wrap + (add-after 'install 'wrap-ld-path (lambda* (#:key inputs outputs #:allow-other-keys) - ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a - ;; fix of the mesa package we wrap the pcb executable such that - ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH. - ;; also append ld path for pulseaudio and alsa-lib (let* ((out (assoc-ref outputs "out")) - (udev_path (string-append (assoc-ref inputs "eudev") "/lib")) (pulseaudio_path (string-append (assoc-ref inputs "pulseaudio") "/lib")) (alas_lib_path (string-append (assoc-ref inputs "alsa-lib") "/lib"))) (wrap-program (string-append out "/bin/godot") - `("LD_LIBRARY_PATH" ":" prefix (,udev_path ,pulseaudio_path ,alas_lib_path)))))) + `("LD_LIBRARY_PATH" ":" prefix (,pulseaudio_path ,alas_lib_path)))))) (add-after 'install 'install-godot-desktop (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -2064,7 +2058,7 @@ (define-public godot-lts (inputs (list alsa-lib bullet - freetype + freetype-with-brotli glew glu libtheora @@ -2081,7 +2075,7 @@ (define-public godot-lts opusfile pcre2 pulseaudio - eudev ; FIXME: required by mesa + eudev wslay zenity `(,zstd "lib"))) From patchwork Sun May 19 16:16:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 27697 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0EAF027BBEA; Sun, 19 May 2024 17:17:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A9E6327BBE2 for ; Sun, 19 May 2024 17:17:15 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8jDY-0000iw-0V; Sun, 19 May 2024 12:17:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8jDW-0000ik-Md for guix-patches@gnu.org; Sun, 19 May 2024 12:16:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8jDW-00034J-AJ for guix-patches@gnu.org; Sun, 19 May 2024 12:16:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8jDa-0003Am-9c for guix-patches@gnu.org; Sun, 19 May 2024 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71067] [PATCH 2/2] gnu: godot-lts: Improve package style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 May 2024 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71067 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71067@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 71067-submit@debbugs.gnu.org id=B71067.171613539912172 (code B ref 71067); Sun, 19 May 2024 16:17:02 +0000 Received: (at 71067) by debbugs.gnu.org; 19 May 2024 16:16:39 +0000 Received: from localhost ([127.0.0.1]:36906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8jDC-0003AG-Pz for submit@debbugs.gnu.org; Sun, 19 May 2024 12:16:39 -0400 Received: from 2.mo561.mail-out.ovh.net ([46.105.75.36]:38923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8jDA-0003AA-Ng for 71067@debbugs.gnu.org; Sun, 19 May 2024 12:16:37 -0400 Received: from director6.ghost.mail-out.ovh.net (unknown [10.108.25.136]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4Vj5Rg10WLz1F4j for <71067@debbugs.gnu.org>; Sun, 19 May 2024 16:16:31 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-l8l4k (unknown [10.110.113.134]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D7C3A1FD49; Sun, 19 May 2024 16:16:30 +0000 (UTC) Received: from ngraves.fr ([37.59.142.95]) by ghost-submission-6684bf9d7b-l8l4k with ESMTPSA id 4czMMN4lSmb5CAAAZ5YPGg (envelope-from ); Sun, 19 May 2024 16:16:30 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-95G001800573ec-3553-475c-b61b-5d3a69da7953, 8F9042FB94FE21B7310FA1A939C635510802798D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Sun, 19 May 2024 18:16:06 +0200 Message-ID: <20240519161612.700-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240519161612.700-1-ngraves@ngraves.fr> References: <20240519161612.700-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 2728899900473991906 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdehkedgleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddrleehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejuddtieejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/game-development.scm (godot-lts): Re-indent and ensure max column length to 79. [arguments]: Use gexp. Change-Id: I0bedb66a4e7e0ebe6242df885f1e687ce3a43ce0 --- gnu/packages/game-development.scm | 166 ++++++++++++++++-------------- 1 file changed, 88 insertions(+), 78 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 9591fae7f9e..03b6f1df8b9 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -29,6 +29,7 @@ ;;; Copyright © 2022 Jai Vetrivelan ;;; Copyright © 2022 dan ;;; Copyright © 2023 John Kehayias +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -1972,86 +1973,95 @@ (define-public godot-lts "vhacd" "xatlas"))) (for-each delete-file-recursively - (lset-difference string=? - (scandir ".") - (cons* "." ".." preserved-files))))))))) + (lset-difference + string=? + (scandir ".") + (cons* "." ".." preserved-files))))))))) (build-system scons-build-system) (arguments - `(#:scons-flags (list "platform=x11" "target=release_debug" - ;; Avoid using many of the bundled libs. - ;; Note: These options can be found in the SConstruct file. - "builtin_bullet=no" - "builtin_freetype=no" - "builtin_glew=no" - "builtin_libmpdec=no" - "builtin_libogg=no" - "builtin_libpng=no" - "builtin_libtheora=no" - "builtin_libvorbis=no" - "builtin_libvpx=no" - "builtin_libwebp=no" - "builtin_mbedtls=no" - "builtin_opus=no" - "builtin_pcre2=no" - "builtin_wslay=no" - "builtin_zlib=no" - "builtin_zstd=no") - #:tests? #f ; There are no tests - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'scons-use-env - (lambda _ - ;; Scons does not use the environment variables by default, - ;; but this substitution makes it do so. - (substitute* "SConstruct" - (("env_base = Environment\\(tools=custom_tools\\)") - (string-append - "env_base = Environment(tools=custom_tools)\n" - "env_base = Environment(ENV=os.environ)"))))) - ;; Build headless tools, used for packaging games without depending on X. - (add-after 'build 'build-headless - (lambda* (#:key scons-flags #:allow-other-keys) - (apply invoke "scons" - `(,(string-append "-j" (number->string (parallel-job-count))) - "platform=server" ,@(delete "platform=x11" scons-flags))))) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (headless (assoc-ref outputs "headless")) - (zenity (assoc-ref inputs "zenity"))) - ;; Strip build info from filenames. - (with-directory-excursion "bin" - (for-each - (lambda (file) - (let ((dest (car (string-split (basename file) #\.)))) - (rename-file file dest))) - (find-files "." "godot.*\\.x11\\.opt\\.tools.*")) - (install-file "godot" (string-append out "/bin")) - (install-file "godot_server" (string-append headless "/bin"))) - ;; Tell the editor where to find zenity for OS.alert(). - (wrap-program (string-append out "/bin/godot") - `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) - (add-after 'install 'wrap-ld-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (pulseaudio_path (string-append (assoc-ref inputs "pulseaudio") "/lib")) - (alas_lib_path (string-append (assoc-ref inputs "alsa-lib") "/lib"))) - (wrap-program (string-append out "/bin/godot") - `("LD_LIBRARY_PATH" ":" prefix (,pulseaudio_path ,alas_lib_path)))))) - (add-after 'install 'install-godot-desktop - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (applications (string-append out "/share/applications")) - (icons (string-append out "/share/icons/hicolor"))) - (mkdir-p applications) - (copy-file "misc/dist/linux/org.godotengine.Godot.desktop" - (string-append applications "/godot.desktop")) - (for-each (lambda (icon dest) - (mkdir-p (dirname dest)) - (copy-file icon dest)) - '("icon.png" "icon.svg") - `(,(string-append icons "/256x256/apps/godot.png") - ,(string-append icons "/scalable/apps/godot.svg"))))))))) + (list + ;; Avoid using many of the bundled libs. + ;; Note: These options can be found in the SConstruct file. + #:scons-flags #~(list "platform=x11" "target=release_debug" + "builtin_bullet=no" + "builtin_freetype=no" + "builtin_glew=no" + "builtin_libmpdec=no" + "builtin_libogg=no" + "builtin_libpng=no" + "builtin_libtheora=no" + "builtin_libvorbis=no" + "builtin_libvpx=no" + "builtin_libwebp=no" + "builtin_mbedtls=no" + "builtin_opus=no" + "builtin_pcre2=no" + "builtin_wslay=no" + "builtin_zlib=no" + "builtin_zstd=no") + #:tests? #f ; There are no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'scons-use-env + (lambda _ + ;; Scons does not use the environment variables by default, + ;; but this substitution makes it do so. + (substitute* "SConstruct" + (("env_base = Environment\\(tools=custom_tools\\)") + (string-append + "env_base = Environment(tools=custom_tools)\n" + "env_base = Environment(ENV=os.environ)"))))) + ;; Build headless tools, to package games without depending on X. + (add-after 'build 'build-headless + (lambda* (#:key scons-flags #:allow-other-keys) + (apply invoke "scons" + `(,(string-append + "-j" (number->string (parallel-job-count))) + "platform=server" + ,@(delete "platform=x11" scons-flags))))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (headless (assoc-ref outputs "headless")) + (zenity (assoc-ref inputs "zenity"))) + ;; Strip build info from filenames. + (with-directory-excursion "bin" + (for-each + (lambda (file) + (let ((dest (car (string-split (basename file) #\.)))) + (rename-file file dest))) + (find-files "." "godot.*\\.x11\\.opt\\.tools.*")) + (install-file "godot" (string-append out "/bin")) + (install-file "godot_server" + (string-append headless "/bin"))) + ;; Tell the editor where to find zenity for OS.alert(). + (wrap-program (string-append out "/bin/godot") + `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) + (add-after 'install 'wrap-ld-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pulseaudio_path (string-append + (assoc-ref inputs "pulseaudio") "/lib")) + (alas_lib_path (string-append + (assoc-ref inputs "alsa-lib") "/lib"))) + (wrap-program (string-append out "/bin/godot") + `("LD_LIBRARY_PATH" ":" prefix + (,pulseaudio_path ,alas_lib_path)))))) + (add-after 'install 'install-godot-desktop + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications")) + (icons (string-append out "/share/icons/hicolor"))) + (mkdir-p applications) + (copy-file "misc/dist/linux/org.godotengine.Godot.desktop" + (string-append applications "/godot.desktop")) + (for-each (lambda (icon dest) + (mkdir-p (dirname dest)) + (copy-file icon dest)) + '("icon.png" "icon.svg") + `(,(string-append icons "/256x256/apps/godot.png") + ,(string-append icons + "/scalable/apps/godot.svg"))))))))) (outputs '("out" "headless")) (native-inputs (list pkg-config))