From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0BYI-0005As-F1 for guix-patches@gnu.org; Mon, 17 Apr 2017 14:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0BYE-00022L-FB for guix-patches@gnu.org; Mon, 17 Apr 2017 14:39:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54673) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0BYE-000229-7a for guix-patches@gnu.org; Mon, 17 Apr 2017 14:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0BYD-0005ri-T1 for guix-patches@gnu.org; Mon, 17 Apr 2017 14:39:01 -0400 Subject: bug#26488: [PATCH] gnu: Add crawl. Resent-Message-ID: Message-Id: MIME-Version: 1.0 From: Arun Isaac Date: Tue, 18 Apr 2017 00:07:55 +0530 In-reply-to: <8ac92fe4-14dd-3933-8901-bea4ff8673ac@cock.li> References: <9758282d-96a4-8fe4-183b-a60a43a9eab9@cock.li> <791d5ba7.AEQAJP3OyzEAAAAAAAAAAAO02gcAAAACwQwAAAAAAAW9WABY8IM9@mailjet.com> <8ac92fe4-14dd-3933-8901-bea4ff8673ac@cock.li> Content-Type: text/plain Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26488@debbugs.gnu.org >> Only a matter of aesthetics, but you could split "-C" and "source" into >> separate strings. >> > All the packages in games.scm do it as one string, so I didn't change it > for now. It should be changed for all packages at once. Fair enough... > + #:phases > + (modify-phases %standard-phases > + (delete 'configure) > + (delete 'check) > + ;; Test cases require the source to be rebuild with the -DDEBUG= define. > + ;; Do 'check before 'build to avoid a 3rd build on make install= . > + (add-before 'build 'check > + (lambda* (#:key inputs outputs make-flags > + parallel-build? parallel-tests? #:allow-other-keys) > + (let* ((parallel-flag (format #f "-j~d" (parallel-job-count= ))) > + (test-flags-build (if parallel-build? > + (cons parallel-flag > + make-flags) > + make-flags)) > + (test-flags-run (if parallel-tests? > + (cons parallel-flag > + make-flags) > + make-flags))) The parallel-build? and parallel-tests? arguments are only to disable parallel builds and tests for packages whose build procedures fail when run parallely. crawl's build and tests work fine when run in parallel. So, you don't have to allow for sequential builds in your 'check phase. You can just assume the build is always going to be parallel. No need to test for parallel-build? and parallel-test?. > + (setenv "HOME" (getcwd)) > + ;; Fake a terminal for the test cases. > + (setenv "TERM" "xterm-256color") > + (setenv "COLUMNS" "80") > + (setenv "LINES" "24") It looks like COLUMNS and LINES are not needed to fake a terminal. I was able to build successfully without them. Please check. > + (apply system* (cons* "make" "debug" test-flags-build)) > + (zero? (apply system* (cons* "make" "test" test-flags-run= ))))))))) You can combine the two make commands into one. (zero? (apply system* "make" "debug" "test" flags)) Also note that only the last argument of apply needs to be a list. No need to cons* together to construct a list like you have done. > + (build-system gnu-build-system) > + (inputs `(("ncurses" ,ncurses) > + ("sqlite" ,sqlite) > + ("bison" ,bison) > + ("flex" ,flex) bison and flex are native-inputs. The bison and flex executables are required only at build time. > + ("zlib" ,zlib) > + ("lua51" ,lua-5.1))) > + (native-inputs `(("pkg-config" ,pkg-config) > + ("perl" ,perl))) It would be nice if you could sort all inputs and native-inputs in alphabetical order. Not all package definitions do it. But, it does look neater. =