From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] gnu: Add libepoxy. Date: Mon, 06 Apr 2015 19:05:12 -0400 Message-ID: <87siccyi1j.fsf@netris.org> References: <87wq1q37ls.fsf@pobox.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfG4W-00070Z-O0 for guix-devel@gnu.org; Mon, 06 Apr 2015 19:04:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfG4U-00083E-1x for guix-devel@gnu.org; Mon, 06 Apr 2015 19:04:48 -0400 Received: from world.peace.net ([50.252.239.5]:60710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfG4T-000836-UP for guix-devel@gnu.org; Mon, 06 Apr 2015 19:04:45 -0400 In-Reply-To: <87wq1q37ls.fsf@pobox.com> (Andy Wingo's message of "Sun, 05 Apr 2015 17:41:51 +0200") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel@gnu.org Andy Wingo writes: > From 42e4d5669bd12dbe7de3e47d14f987a0f3cd7059 Mon Sep 17 00:00:00 2001 > From: Andy Wingo > Date: Sun, 5 Apr 2015 11:28:32 +0200 > Subject: [PATCH 2/3] gnu: Add libepoxy. > > * gnu/packages/gl.scm (libepoxy): New variable. > --- > gnu/packages/gl.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 insertions(+) > > > diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm > index dc90a12..15bc91c 100644 > --- a/gnu/packages/gl.scm > +++ b/gnu/packages/gl.scm > @@ -418,3 +418,49 @@ extension functionality is exposed in a single header file.") > "Guile-OpenGL is a library for Guile that provides bindings to the > OpenGL graphics API.") > (license l:lgpl3+))) > + > +(define-public libepoxy > + (package > + (name "libepoxy") > + (version "1.2") > + (source (origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/anholt/libepoxy/archive/v" > + version > + ".tar.gz")) For source URIs like this, where the last file name component doesn't contain the package name (in this case it is "v1.2.tar.gz"), we prefer to add a 'file-name' field to the 'origin' form: (file-name (string-append name "-" version ".tar.gz")) Otherwise, the file name of the source tarball in the store will be /gnu/store/-v1.2.tar.gz which is suboptimal. > + (sha256 > + (base32 > + "1xp8g6b7xlbym2rj4vkbl6xpb7ijq7glpv656mc7k9b01x22ihs2")))) > + (arguments > + '(#:phases > + (alist-cons-after > + 'unpack 'autoreconf > + (lambda _ > + (zero? (system* "autoreconf" "-vif"))) > + (alist-cons-before > + 'configure 'patch-paths > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((python (assoc-ref inputs "python")) > + (mesa (assoc-ref inputs "mesa"))) > + (substitute* "src/gen_dispatch.py" > + (("/usr/bin/env python") python)) > + (substitute* (find-files "." "\\.[ch]$") > + (("libGL.so.1") (string-append mesa "/lib/libGL.so.1")) > + (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1"))))) Phases are supposed to return true for success or false for failure. Since 'substitute*'s return value is unspecified, we should add a #t to the end. I went ahead and pushed this to 'core-updates' with these changes. Thanks! Mark