From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH] gnu: Add dlib. Date: Sun, 14 Aug 2016 13:25:44 -0400 Message-ID: <20160814172544.GA28736@jasmine> References: <8737m837zk.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYzAd-0003MF-6i for guix-devel@gnu.org; Sun, 14 Aug 2016 13:26:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYzAY-0006O7-VH for guix-devel@gnu.org; Sun, 14 Aug 2016 13:25:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYzAX-0006Mw-P2 for guix-devel@gnu.org; Sun, 14 Aug 2016 13:25:54 -0400 Content-Disposition: inline In-Reply-To: <8737m837zk.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Marius Bakke Cc: guix-devel On Sat, Aug 13, 2016 at 06:15:59PM +0100, Marius Bakke wrote: > * gnu/packages/machine-learning.scm (dlib): New variable. Thanks! > + (version "19.0") The released 19.1 yesterday. Will you send an updated patch using the latest version? > + (arguments > + `(#:phases > + (let ((test-dir (string-append "../dlib-" ,version "/dlib/test/build"))) > + (modify-phases %standard-phases > + (add-before 'check 'build-test-suite > + ;; No test target, so we build and run the unit tests here. > + (lambda _ > + (mkdir-p test-dir) > + (chdir test-dir) > + (zero? (system* "cmake" "..")) > + (zero? (system* "cmake" "--build" "." "--config" "Release")))) > + (replace 'check > + (lambda _ (zero? (system* "./dtest" "--runall")))) I think we should combine these two phases, and use with-directory-excursion (defined in guix build utils) instead of chdir-ing back and forth. > + (add-after 'check 'ascend-to-build-directory > + (lambda _ (chdir "../../../../build") #t)))))) Then, this phase can be removed. What do you think?