From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] gnu: Add guile-opengl Date: Fri, 27 Jun 2014 00:08:54 -0400 Message-ID: <87tx77t2nd.fsf@yeeloong.lan> References: <87pphxd9uf.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87k384okj4.fsf@gnu.org> <8761jov8nb.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0NUE-0006sT-OZ for guix-devel@gnu.org; Fri, 27 Jun 2014 00:10:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0NU8-0000XG-GB for guix-devel@gnu.org; Fri, 27 Jun 2014 00:10:06 -0400 In-Reply-To: <8761jov8nb.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Wed, 25 Jun 2014 20:04:08 -0400") 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: David Thompson Cc: guix-devel@gnu.org David Thompson writes: > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (define (dynamic-link-substitute file lib input) > + (substitute* file > + (("dynamic-link \"lib([a-zA-Z]+)\"" _ lib) > + (string-append "dynamic-link \"" > + (assoc-ref inputs input) > + "/lib/lib" lib "\"")))) I think the 'substitute*' form binds 'lib' to whatever matched the pattern ([a-zA-z]+), thus shadowing the 'lib' argument to 'dynamic-link-substitute', so I think you could simply remove that argument, or no? > + ;; Replace dynamic-link calls for libGL, libGLU, and > + ;; libglut with absolute paths to the store. > + (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa") > + (dynamic-link-substitute "glu/runtime.scm" "GLU" "mesa") > + (dynamic-link-substitute "glut/runtime.scm" "glut" > + "freeglut")) > + %standard-phases))) Thanks! Mark