From: Ben Woodcroft <b.woodcroft@uq.edu.au>
To: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: [PATCH] Add yaggo.
Date: Wed, 24 Jun 2015 14:35:03 +1000 [thread overview]
Message-ID: <558A3377.6060301@uq.edu.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]
Actually, I lie, this patch only sort of works. The issue is that it
only works when a ruby package is also installed, GEM_PATH does not get
set as part of the ruby-build-system for yaggo. The lib/ files are
copied to what I gather is the correct place, but the env isn't right.
The same also appears to be true of other ruby packages e.g. ruby-hoe:
$ guix package -i ruby-hoe
..
ben@u:~/git/guix$ guix package --search-paths
warning: failed to install locale: Invalid argument
export PATH="/home/ben/.guix-profile/bin:/home/ben/.guix-profile/sbin"
export PYTHONPATH="/home/ben/.guix-profile/lib/python3.4/site-packages"
export
PKG_CONFIG_PATH="/home/ben/.guix-profile/lib/pkgconfig:/home/ben/.guix-profile/share/pkgconfig"
export GUILE_LOAD_PATH="/home/ben/.guix-profile/share/guile/site/2.0"
export
GUILE_LOAD_COMPILED_PATH="/home/ben/.guix-profile/share/guile/site/2.0"
export CPATH="/home/ben/.guix-profile/include"
export LIBRARY_PATH="/home/ben/.guix-profile/lib"
export ACLOCAL_PATH="/home/ben/.guix-profile/share/aclocal"
i.e. no GEM_PATH entry, hence:
$ sow -h
/gnu/store/9iifw37m8vd5bkj0fh67ndc5f2da46wb-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:315:in
`to_specs': Could not find 'hoe' (>= 0) among 9 total gem(s)
(Gem::LoadError)
Checked in
'GEM_PATH=/home/ben/.gem/ruby/2.2.0:/gnu/store/9iifw37m8vd5bkj0fh67ndc5f2da46wb-ruby-2.2.2/lib/ruby/gems/2.2.0',
execute `gem env` for more information
from
/gnu/store/9iifw37m8vd5bkj0fh67ndc5f2da46wb-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:324:in
`to_spec'
from
/gnu/store/9iifw37m8vd5bkj0fh67ndc5f2da46wb-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in
`gem'
from /home/ben/.guix-profile/bin/sow:22:in `<main>'
Files are there though:
$ ls /home/ben/.guix-profile/lib/ruby/gems/2.2.0/gems/
hoe-3.13.1 yaggo-1.5.4
FYI: I actually only care about yaggo because it is a build dependency
of jellyfish, but I'm having some problems with make check so no patch yet.
Thanks,
ben
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-yaggo.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-yaggo.patch", Size: 2159 bytes --]
From d220bdeac89660108de96a96107daf89182310e0 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Wed, 24 Jun 2015 14:32:26 +1000
Subject: [PATCH] gnu: Add yaggo.
* gnu/packages/ruby.scm (yaggo): New variable.
---
gnu/packages/ruby.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index af87cf5..19006d3 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 David Thompson <davet@gnu.org>
+;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -697,3 +698,34 @@ options and parsing command line flags.")
net/http library.")
(home-page "https://github.com/nicksieger/multipart-post")
(license license:expat)))
+
+(define-public yaggo
+ (package
+ (name "yaggo")
+ (version "1.5.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/gmarcais/yaggo/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1mxfvrim03xg80agws9zdpk00r0kjpqhw3xbli0w8wvsnsa274y3"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:tests? #f ;; no rake test, and Makefile in test/ appears malformed
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda* _
+ (zero? (system* "rake"
+ "gem")))))))
+ (synopsis "Generate C++ command line parsers using getopt_long")
+ (description "Yaggo is a tool to generate command line parsers for
+C++. Yaggo stands for 'Yet Another GenGetOpt' and is inspired by GNU
+Gengetopt. It reads a configuration file describing the switches and argument
+for a C++ program and it generates one header file that parses the command
+line using getopt_long(3).")
+ (home-page "https://github.com/gmarcais/yaggo")
+ (license license:gpl3+)))
--
2.1.4
next reply other threads:[~2015-06-24 4:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-24 4:35 Ben Woodcroft [this message]
2015-06-24 5:51 ` [PATCH] Add yaggo Pjotr Prins
2015-06-24 12:32 ` Thompson, David
2015-06-24 13:05 ` Ricardo Wurmus
2015-06-24 19:23 ` Pjotr Prins
2015-06-25 22:47 ` Thompson, David
2015-06-26 6:56 ` Ricardo Wurmus
2015-06-26 7:40 ` Pjotr Prins
2015-06-24 12:19 ` Thompson, David
2015-06-24 23:41 ` Ben Woodcroft
2015-06-25 22:25 ` Thompson, David
2015-07-05 7:33 ` Mark H Weaver
2015-07-05 11:33 ` Ben Woodcroft
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558A3377.6060301@uq.edu.au \
--to=b.woodcroft@uq.edu.au \
--cc=guix-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).