From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kB+yByzMbF/BMQAA0tVLHw (envelope-from ) for ; Thu, 24 Sep 2020 16:41:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KKSUAyzMbF8QKgAA1q6Kng (envelope-from ) for ; Thu, 24 Sep 2020 16:41:16 +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 716DC940416 for ; Thu, 24 Sep 2020 16:41:15 +0000 (UTC) Received: from localhost ([::1]:35892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLU9F-0000CV-Ua for larch@yhetil.org; Thu, 24 Sep 2020 12:31:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLTRe-0004HM-Q3 for guix-patches@gnu.org; Thu, 24 Sep 2020 11:46:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLTRa-0000D1-Hh for guix-patches@gnu.org; Thu, 24 Sep 2020 11:46:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLTRa-0008N7-Fx for guix-patches@gnu.org; Thu, 24 Sep 2020 11:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42376] [PATCH] Add raylib. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Sep 2020 15:46:02 +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: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Cc: 42376@debbugs.gnu.org, trymonv@cock.li Received: via spool by 42376-submit@debbugs.gnu.org id=B42376.160096232632137 (code B ref 42376); Thu, 24 Sep 2020 15:46:02 +0000 Received: (at 42376) by debbugs.gnu.org; 24 Sep 2020 15:45:26 +0000 Received: from localhost ([127.0.0.1]:41392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLTQz-0008MH-V7 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 11:45:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLTQy-0008Lz-38 for 42376@debbugs.gnu.org; Thu, 24 Sep 2020 11:45:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35179) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLTQr-0008P2-Kl; Thu, 24 Sep 2020 11:45:17 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57604 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kLTQr-0000aM-8R; Thu, 24 Sep 2020 11:45:17 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200718120210.d23vaoormh6uev2s@gravity> Date: Thu, 24 Sep 2020 17:45:15 +0200 In-Reply-To: <20200718120210.d23vaoormh6uev2s@gravity> ("Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?="'s message of "Sat, 18 Jul 2020 14:02:10 +0200") Message-ID: <87v9g35gc4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=pass (policy=none) header.from=gnu.org; 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: -1.51 X-TUID: BZFWj1QniD5A Ping! :-) Jakub K=C4=85dzio=C5=82ka skribis: > 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