all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/3] gnu: Add ruby-git.
@ 2015-06-13 12:13 David Thompson
  2015-06-15 20:25 ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: David Thompson @ 2015-06-13 12:13 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-ruby-git.patch --]
[-- Type: text/x-patch, Size: 2407 bytes --]

From d5062fe608d840aca5034c9374dc0a99c926554b Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
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.")
+    (home-page "https://github.com/schacon/ruby-git")
+    (license license:expat)))
-- 
2.2.1


[-- Attachment #2: Type: text/plain, Size: 38 bytes --]


-- 
David Thompson
GPG Key: 0FF1D807

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] gnu: Add ruby-git.
  2015-06-13 12:13 [PATCH 1/3] gnu: Add ruby-git David Thompson
@ 2015-06-15 20:25 ` Mark H Weaver
  2015-06-15 20:28   ` Thompson, David
  0 siblings, 1 reply; 4+ messages in thread
From: Mark H Weaver @ 2015-06-15 20:25 UTC (permalink / raw)
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> writes:

> From d5062fe608d840aca5034c9374dc0a99c926554b Mon Sep 17 00:00:00 2001
> From: David Thompson <davet@gnu.org>
> 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?

> +    (home-page "https://github.com/schacon/ruby-git")
> +    (license license:expat)))

Otherwise looks good to me.

     Thanks!
       Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] gnu: Add ruby-git.
  2015-06-15 20:25 ` Mark H Weaver
@ 2015-06-15 20:28   ` Thompson, David
  2015-06-15 20:32     ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Thompson, David @ 2015-06-15 20:28 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Mon, Jun 15, 2015 at 4:25 PM, Mark H Weaver <mhw@netris.org> wrote:
> David Thompson <dthompson2@worcester.edu> writes:
>
>> From d5062fe608d840aca5034c9374dc0a99c926554b Mon Sep 17 00:00:00 2001
>> From: David Thompson <davet@gnu.org>
>> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] gnu: Add ruby-git.
  2015-06-15 20:28   ` Thompson, David
@ 2015-06-15 20:32     ` Mark H Weaver
  0 siblings, 0 replies; 4+ messages in thread
From: Mark H Weaver @ 2015-06-15 20:32 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> writes:

> On Mon, Jun 15, 2015 at 4:25 PM, Mark H Weaver <mhw@netris.org> wrote:
>> 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.

Sure, sounds like the right approach to me.

    Thanks,
      Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-15 20:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-13 12:13 [PATCH 1/3] gnu: Add ruby-git David Thompson
2015-06-15 20:25 ` Mark H Weaver
2015-06-15 20:28   ` Thompson, David
2015-06-15 20:32     ` Mark H Weaver

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.