From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YPQoAPzkEl91NAAA0tVLHw (envelope-from ) for ; Sat, 18 Jul 2020 12:03:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GDp2N/vkEl9LOwAAbx9fmQ (envelope-from ) for ; Sat, 18 Jul 2020 12:03:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 21D009404D9 for ; Sat, 18 Jul 2020 12:03:07 +0000 (UTC) Received: from localhost ([::1]:44826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwlYY-00030J-3E for larch@yhetil.org; Sat, 18 Jul 2020 08:03:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwlYU-00030B-9C for guix-patches@gnu.org; Sat, 18 Jul 2020 08:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46915) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jwlYU-0007k4-0X for guix-patches@gnu.org; Sat, 18 Jul 2020 08:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jwlYT-0006jj-UA for guix-patches@gnu.org; Sat, 18 Jul 2020 08:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42376] [PATCH] Add raylib. Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Jul 2020 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42376 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: trymonv@cock.li Cc: 42376@debbugs.gnu.org X-Debbugs-Original-Cc: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159507374725854 (code B ref -1); Sat, 18 Jul 2020 12:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jul 2020 12:02:27 +0000 Received: from localhost ([127.0.0.1]:58461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwlXv-0006iw-2g for submit@debbugs.gnu.org; Sat, 18 Jul 2020 08:02:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:60506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwlXs-0006io-Hs for submit@debbugs.gnu.org; Sat, 18 Jul 2020 08:02:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwlXs-0002yQ-Bc for guix-patches@gnu.org; Sat, 18 Jul 2020 08:02:24 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:55514) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwlXp-0007h0-F0 for guix-patches@gnu.org; Sat, 18 Jul 2020 08:02:24 -0400 Received: (qmail 24685 invoked by uid 1009); 18 Jul 2020 14:02:12 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25876. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.073339 secs); 18 Jul 2020 12:02:12 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 18 Jul 2020 14:02:12 +0200 Date: Sat, 18 Jul 2020 14:02:10 +0200 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200718120210.d23vaoormh6uev2s@gravity> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="chzw6qcnaw2ks24w" Content-Disposition: inline In-Reply-To: Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/18 08:02:13 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -2.61 X-TUID: NS9sxGGmi6WK --chzw6qcnaw2ks24w Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 15, 2020 at 04:25:21PM +0200, trymonv@cock.li wrote: > gnu/packages/game-development.scm | 34 +++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) Thanks for the patch! Note that this blob got included as the commit message, which isn't really desirable. Instead of `git diff', I'd recommend `git commit', followed by `git format-patch' and/or `git send-email' (the latter is available as git:send-email - the send-email output of the git package). > diff --git a/gnu/packages/game-development.scm > b/gnu/packages/game-development.scm > index e45980e7a0..cba9b5bd45 100644 > --- a/gnu/packages/game-development.scm > +++ b/gnu/packages/game-development.scm Could you add a Copyright line for yourself? > +(define-public raylib > + (package > + (name "raylib") > + (version "3.0.0") > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/raysan5/raylib/") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "1chj7sril4l2dxh7flp5ndddydbbf1fhnqlydaysm4m6waxidxmr"))= )) > + (build-system cmake-build-system) > + (arguments '(#:configure-flags `("-DSHARED=3DOFF" "-DSTATIC=3DON") > + #:tests? #f)) If you have to disable tests, put a small explanation in a comment. However, in this case I managed to get the test suite to pass like this: (arguments `(#:configure-flags `("-DSHARED=3DOFF" "-DSTATIC=3DON") #:phases (modify-phases %standard-phases ;; check needs to run after install (delete 'check) (add-after 'install 'check (assoc-ref %standard-phases 'check)) (add-before 'check 'set-CC (lambda _ (setenv "CC" ,(cc-for-target)) #t))))) > + (inputs `()) > + (native-inputs `(("alsa-lib", alsa-lib) > + ("glu", glu) > + ("libx11", libx11) > + ("libxrandr", libxrandr) > + ("libxi", libxi) > + ("libxinerama", libxinerama) > + ("libxcursor", libxcursor) > + ("mesa", mesa) > + ("pkg-config", pkg-config))) I don't think these should be native-inputs. native-inputs are for things that are ran during compilation, like the compiler itself or pkg-config. The rest is clearly going to run at runtime, so they should go in inputs. This distinction is necessary for cross-compilation. If all your dependencies supported it, you could test it with guix build --target=3Daarch64-linux-gnu but unfortunately mesa's buildsystem refuses to cross-compile. It's still a good idea to put the inputs in their proper categories, though. One good heuristic is to run 'guix size raylib' and see which packages are referenced. Speaking of which - alsa-lib doesn't show up in 'guix size', and removing it from the inputs doesn't trigger any errors. Are you sure it's being used? Maybe you're missing some configuration flag? Also, the source for raylib includes its own copies of many libraries which are already packaged separately in Guix, such as glfw or stb. Could you configure raylib to use Guix-provided versions of these libraries? A good way to make sure it works is to remove the bundled sources. The preferred way of doing so is a 'snippet', you can find an example in the rust-curl-sys-0.4 package in gnu/packages/crates-io.scm. Regards, Jakub K=C4=85dzio=C5=82ka --chzw6qcnaw2ks24w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl8S5MIACgkQ4xWnWEYT FWRnqA/9GoYFRTlPANYAlQerleJAZgGVMad7EbRHK4Uma/YdSlI/EBLxXJbqKG8Q q0isScFUCDap/DxUCn9HMTz5+1pT0I4HOIoDJVqzvC7J29QtLDvXI11H2bO2I97h dj+Y2Uds4x1dYQL8HeafIHlCAgRLSssjd9d7TFIewPjBMKIzdqGaWwFOt6HS2aUZ 9gbBQHZOQR4mdJCk4n44DoqbOikCCsYQGKdQQmIi6aqMCPKgz/GgVzf3ZTamuuJQ f9fUJ3cnDPcox/c4w1yC1Q1NlmuIMUUDrSZKmiV61Yt6gFtS30XGA2UBXGLycsXN KVmAIgRhQhRQLqJhoN2lUmmT0OyTEbBpYBKvSzUFPKCmbCY7MIWSZFqhwAeyx14r juLU2ANxbzdx0TYosQdmqpyONBPyVqwYEJyMnGiswgnvr4w99o0MjH477WuFxUTz /HKzWe2OuOkt8moYWbovfI1ZnuNl9rx8ipcw+8CS37rtmFhiANu4H4bRbDeA28Sf eMVFeINPIR3uaJENAYA+ZT2oKNR8GEGIA2M/A4YhcEZIfn0v1C4qDIuTFdQaRdk2 jvGGVw5lzWZczsYe0qwffCU6p7aTz4y6nm2E4hhAP74NAv+KYNbyfOITRGbYVetM oikpm2+EAwJbPyHhjhyIE8OCY59C7L/n9ig1wqjG/biDjjjiV/k= =1/5l -----END PGP SIGNATURE----- --chzw6qcnaw2ks24w--