From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: [PATCH 1/3] gnu: Add ruby-git. Date: Mon, 15 Jun 2015 16:28:53 -0400 Message-ID: References: <87wpz7u7qg.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87a8w0ius3.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4b06-0000ed-K4 for guix-devel@gnu.org; Mon, 15 Jun 2015 16:28:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4b02-0004mC-Ki for guix-devel@gnu.org; Mon, 15 Jun 2015 16:28:58 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4b02-0004lt-FC for guix-devel@gnu.org; Mon, 15 Jun 2015 16:28:54 -0400 Received: by padev16 with SMTP id ev16so72319977pad.0 for ; Mon, 15 Jun 2015 13:28:53 -0700 (PDT) In-Reply-To: <87a8w0ius3.fsf@netris.org> 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: Mark H Weaver Cc: guix-devel On Mon, Jun 15, 2015 at 4:25 PM, Mark H Weaver wrote: > David Thompson writes: > >> From d5062fe608d840aca5034c9374dc0a99c926554b Mon Sep 17 00:00:00 2001 >> From: David Thompson >> Date: Sat, 13 Jun 2015 07:46:02 -0400 >> Subject: [PATCH 1/3] gnu: Add ruby-git. >> >> * gnu/packages/ruby.scm (ruby-git): New variable. >> --- >> gnu/packages/ruby.scm | 33 +++++++++++++++++++++++++++++++++ >> 1 file changed, 33 insertions(+) >> >> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm >> index f7759ec..bd7ab79 100644 >> --- a/gnu/packages/ruby.scm >> +++ b/gnu/packages/ruby.scm >> @@ -28,6 +28,7 @@ >> #:use-module (gnu packages autotools) >> #:use-module (gnu packages libffi) >> #:use-module (gnu packages gdbm) >> + #:use-module (gnu packages version-control) >> #:use-module (guix packages) >> #:use-module (guix download) >> #:use-module (guix git-download) >> @@ -570,3 +571,35 @@ functionality, making it easier to migrate test suites from bacon to minitest.") >> run as a daemon and to be controlled by simple start/stop/restart commands.") >> (home-page "https://github.com/thuehlinger/daemons") >> (license license:expat))) >> + >> +(define-public ruby-git >> + (package >> + (name "ruby-git") >> + (version "1.2.9.1") >> + (source (origin >> + (method url-fetch) >> + (uri (string-append >> + "https://github.com/schacon/ruby-git/archive/v" >> + version ".tar.gz")) >> + (file-name (string-append name "-" version ".tar.gz")) >> + (sha256 >> + (base32 >> + "08zg20zc7f7yy34ix2qdd8jbiz7xhjc8alk370869sq3h75hs9jc")))) >> + (build-system ruby-build-system) >> + (arguments >> + '(#:phases (modify-phases %standard-phases >> + (add-before 'check 'create-fake-home >> + (lambda _ >> + ;; The test suite runs 'git config --global' commands, >> + ;; so a fake home directory is needed for them to >> + ;; succeed. >> + (let ((fake-home (string-append (getcwd) "/fake-home"))) >> + (mkdir fake-home) >> + (setenv "HOME" fake-home))))))) >> + (native-inputs >> + `(("git" ,git))) >> + (synopsis "Ruby wrappers for Git") >> + (description "Ruby/Git is a Ruby library that can be used to create, read >> +and manipulate Git repositories by wrapping system calls to the git binary.") > > It would be good to rewrite the references to the 'git' binary in the > code to use an absolute path. This argues for making 'git' a normal > input. What do you think? I was conflicted about this when packaging so I didn't touch it. The git binary is a configurable variable here, and I believe it defaults to 'git'. I could try to patch the default value of it to be an absolute path to git in the store, if you think that is reasonable. Thanks! - Dave