[bug#30689,05/39] gnu: Add ruby-idn-ruby.

Message ID 20190128173620.27999-5-mail@cbaines.net
State Accepted
Headers show
Series Add ruby-rails and depedencies. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Christopher Baines Jan. 28, 2019, 5:35 p.m. UTC
Required for the ruby-addressable tests.

* gnu/packages/ruby.scm (ruby-idn-ruby): New variable.
---
 gnu/packages/ruby.scm | 45 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Comments

Björn Höfling Feb. 3, 2019, 11:07 p.m. UTC | #1
On Mon, 28 Jan 2019 17:35:46 +0000
Christopher Baines <mail@cbaines.net> wrote:

> Required for the ruby-addressable tests.
> 
> * gnu/packages/ruby.scm (ruby-idn-ruby): New variable.

This package is NOT reproducible:

│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ @@ -27,16 +27,16 @@
│ │ │ │ │ │ │  rubyarchhdrdir = $(rubyhdrdir)/$(arch)
│ │ │ │ │ │ │  vendorhdrdir = $(rubyhdrdir)/vendor_ruby
│ │ │ │ │ │ │  sitehdrdir = $(rubyhdrdir)/site_ruby
│ │ │ │ │ │ │  rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
│ │ │ │ │ │ │  vendorarchdir = $(vendorlibdir)/$(sitearch)
│ │ │ │ │ │ │  vendorlibdir = $(vendordir)/$(ruby_version)
│ │ │ │ │ │ │  vendordir = $(rubylibprefix)/vendor_ruby
│ │ │ │ │ │ │ -sitearchdir = $(DESTDIR)./.gem.20190203-76-1x18rur
│ │ │ │ │ │ │ -sitelibdir = $(DESTDIR)./.gem.20190203-76-1x18rur
│ │ │ │ │ │ │ +sitearchdir = $(DESTDIR)./.gem.20190203-76-3av0wa
│ │ │ │ │ │ │ +sitelibdir = $(DESTDIR)./.gem.20190203-76-3av0wa

Can you have a look into it?

I have NOT reviewed anything else of that package.

Thank you,

Björn
Christopher Baines Feb. 8, 2019, 8:01 p.m. UTC | #2
Björn Höfling <bjoern.hoefling@bjoernhoefling.de> writes:

> On Mon, 28 Jan 2019 17:35:46 +0000
> Christopher Baines <mail@cbaines.net> wrote:
>
>> Required for the ruby-addressable tests.
>>
>> * gnu/packages/ruby.scm (ruby-idn-ruby): New variable.
>
> This package is NOT reproducible:
>
> │ │ │ │ │ │ ├── Makefile
> │ │ │ │ │ │ │ @@ -27,16 +27,16 @@
> │ │ │ │ │ │ │  rubyarchhdrdir = $(rubyhdrdir)/$(arch)
> │ │ │ │ │ │ │  vendorhdrdir = $(rubyhdrdir)/vendor_ruby
> │ │ │ │ │ │ │  sitehdrdir = $(rubyhdrdir)/site_ruby
> │ │ │ │ │ │ │  rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
> │ │ │ │ │ │ │  vendorarchdir = $(vendorlibdir)/$(sitearch)
> │ │ │ │ │ │ │  vendorlibdir = $(vendordir)/$(ruby_version)
> │ │ │ │ │ │ │  vendordir = $(rubylibprefix)/vendor_ruby
> │ │ │ │ │ │ │ -sitearchdir = $(DESTDIR)./.gem.20190203-76-1x18rur
> │ │ │ │ │ │ │ -sitelibdir = $(DESTDIR)./.gem.20190203-76-1x18rur
> │ │ │ │ │ │ │ +sitearchdir = $(DESTDIR)./.gem.20190203-76-3av0wa
> │ │ │ │ │ │ │ +sitelibdir = $(DESTDIR)./.gem.20190203-76-3av0wa
>
> Can you have a look into it?
>
> I have NOT reviewed anything else of that package.

Interesting, it seems that the ruby-build-system should remove some
unnecessary files, like this Makefile you mention, but the functionality
is not working.

I've pushed a patch [1] that fixes this to the bug I already have open
regarding the ruby-build-system [2].

1: [PATCH v2 3/3] guix: ruby-build-system: Fix removal of extension
related files.
2: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34385

Thanks,

Chris

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 57f7108b66..ed31ef1bdc 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -40,6 +40,7 @@ 
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages java)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages libidn)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
@@ -1993,6 +1994,50 @@  irb's last-word approach.")
     (home-page "http://tagaholic.me/bond/")
     (license license:expat)))
 
+(define-public ruby-idn-ruby
+  (package
+    (name "ruby-idn-ruby")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "idn-ruby" version))
+       (sha256
+        (base32
+         "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'run-extconf.rb
+           (lambda _
+             (with-directory-excursion "ext"
+               (invoke "ruby" "extconf.rb")
+               (invoke "make"))
+             #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (apply invoke
+                      "ruby" "--verbose" "-Iext"
+                      (find-files "./test" ".*\\.rb")))
+             #t)))))
+    (inputs
+     `(("libidn" ,libidn)))
+    (synopsis "Ruby Bindings for the GNU LibIDN library")
+    (description
+     "Ruby Bindings for the GNU LibIDN library, an implementation of the
+Stringprep, Punycode and IDNA specifications.  These are used to encode and
+decode internationalized domain + names according to the IDNA2003
+specifications.
+
+Included are the most important parts of the Stringprep, Punycode and IDNA
+APIs like performing Stringprep processings, encoding to and decoding from
+Punycode strings and converting entire domain names to and from the ACE
+encoded form.")
+    (home-page "https://github.com/deepfryed/idn-ruby")
+    (license license:asl2.0)))
+
 (define-public ruby-instantiator
   (package
     (name "ruby-instantiator")