all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Pjotr Prins <pjotr.public12@thebird.nl>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: Add ruby-nokogiri
Date: Mon, 13 Jul 2015 15:24:20 +0200	[thread overview]
Message-ID: <877fq4i41n.fsf@elephly.net> (raw)
In-Reply-To: <20150713130956.GC28969@thebird.nl>

Hi Pjotr,

following are a couple of comments about the patch.  (I did not try it
myself.)

> From e2fd935a659cacde5cb74bef19406f056a262f79 Mon Sep 17 00:00:00 2001
> From: pjotrp <pjotr.public01@thebird.nl>
> Date: Mon, 13 Jul 2015 14:56:40 +0200
> Subject: [PATCH] gnu: Add ruby-nokogiri

> * gnu/packages/ruby.scm (gnu-nokogiri): New variable

The name of the variable is ‘ruby-nokogiri’, not ‘gnu-nokogiri’.  There
also should be a period at the end.

> +(define-public ruby-nokogiri
> +  (package
> +    (name "ruby-nokogiri")
> +    (version "1.6.6.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +		    "https://github.com/sparklemotion/nokogiri/archive/v"
> +                    version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +	      (patches (map search-patch
> +                            (list "ruby-nokogiri-Rakefile.patch")))

‘(patches ...)’ should be aligned with the previous line.  ‘(list’
should be aligned with ‘search-patch’.  Since you only have one patch,
though, I think using ‘(map search-patch’ is odd.

> +    (arguments
> +     '(
> +       #:tests? #f  ;; test fails because nokogiri can only test with a built extension (now part of install phase)

‘'(’ should not be on a line of its own.  The margin comment should only
have one semicolon and the text should be broken up to avoid long lines.

> +       #:gem-flags (list "--use-system-libraries" (string-append "--with-xml2-include=" (assoc-ref %build-inputs "libxml2") "/include/libxml2" ))

This is a very long line.  It can be broken up easily.

> +       #:phases (alist-replace
> +                 'build
> +                 (lambda _
> +		   ;; calling rake gem 2x begets a gem
> +		   (system* "rake" "gem")
> +		   (zero? (system* "rake" "gem")))
> +		  %standard-phases)))

The alignment here is off.  Also consider using the ‘modify-phases’
syntax instead.  Why exactly is “rake gem” called twice?  What is
different the second time around?

> +    (native-inputs
> +     `(("ruby-hoe" ,ruby-hoe)
> +       ("ruby-rake-compiler", ruby-rake-compiler)))
> +    (inputs
> +     `(("zlib" ,zlib)
> +       ("libxml2" ,libxml2)
> +       ("libxslt" ,libxslt)))
> +    (synopsis "Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser")
> +    (description "Nokogiri parses and searches XML/HTML very quickly, and also has correctly implemented CSS3 selector support as well as XPath 1.0 support.")

Please break apart the long description into multiple lines.  In Emacs
you can do this easily with ‘fill-paragraph’ (bound to ‘M-q’ by
default).

> +    (home-page "http://www.nokogiri.org/")
> +    (license license:x11)))
> +

~~ Ricardo

  reply	other threads:[~2015-07-13 13:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 13:09 [PATCH] gnu: Add ruby-nokogiri Pjotr Prins
2015-07-13 13:24 ` Ricardo Wurmus [this message]
2015-07-14  9:06   ` Pjotr Prins
2015-07-14 14:25     ` Ricardo Wurmus
2016-02-17 22:37     ` Pjotr Prins
2016-02-17 23:05       ` Ben Woodcroft
2016-02-18  6:25         ` Foreign packages (formerly Re: [PATCH] gnu: Add ruby-nokogiri) Pjotr Prins
2016-02-21 11:16           ` Ricardo Wurmus
2016-02-21 11:50             ` Ben Woodcroft
2016-02-21 12:05               ` Pjotr Prins
2016-02-21 17:22                 ` Foreign packages and reproducibility " Pjotr Prins
2016-02-21 17:31                   ` Pjotr Prins
2016-02-22 12:51                     ` Pjotr Prins
2016-02-23 18:52                       ` Pjotr Prins
2016-03-02 10:33                         ` Ricardo Wurmus
2016-03-02 18:50                           ` Pjotr Prins
2016-02-21 12:02             ` Foreign packages " Pjotr Prins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fq4i41n.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.