From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/3] build: Add ruby build system. Date: Sun, 28 Sep 2014 17:50:28 +0200 Message-ID: <87zjdjagmz.fsf@gnu.org> References: <1411917760-28557-1-git-send-email-dthompson2@worcester.edu> <1411917760-28557-2-git-send-email-dthompson2@worcester.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYGk9-0004J2-RN for guix-devel@gnu.org; Sun, 28 Sep 2014 11:50:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYGk4-0001Vo-US for guix-devel@gnu.org; Sun, 28 Sep 2014 11:50:37 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:40180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYGk4-0001Vh-Mj for guix-devel@gnu.org; Sun, 28 Sep 2014 11:50:32 -0400 In-Reply-To: <1411917760-28557-2-git-send-email-dthompson2@worcester.edu> (David Thompson's message of "Sun, 28 Sep 2014 11:22:39 -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 skribis: > * guix/build-system/ruby.scm: New file. > * guix/build/ruby-build-system: New file. > * Makefile.am (MODULES): Add new files. Nice! Some comments: > +(define build > + (lambda _ > + (system "ls -la") Debugging leftover? > + (let ((gemspec (car (find-files "." "\\.gemspec$")))) > + (zero? (system* "gem" "build" gemspec))))) Rather (match (find-files ...) ...). > +(define* (install #:key source inputs outputs #:allow-other-keys) > + (let* ((ruby-version > + (match:substring (string-match "ruby-(.*)$" > + (assoc-ref inputs "ruby")) > + 1)) > + (gem-home (string-append (assoc-ref outputs "out") > + "/lib/ruby/gems/" > + ruby-version))) > + (setenv "GEM_HOME" gem-home) > + (mkdir-p gem-home) > + (let ((gem (car (find-files "." "\\.gem$")))) > + (zero? (system* "gem" "install" "--local" gem))))) Ditto. Might be worth defining =E2=80=98first-gem-file=E2=80=99 for that. Could you also add a few lines in guix.texi under =E2=80=9CBuild Systems=E2= =80=9D? Thanks, Ludo=E2=80=99.