From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH] Gemspecs / Add ruby-ruby-engine. Date: Wed, 30 Dec 2015 17:13:48 +1000 Message-ID: <5683842C.3090706@uq.edu.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040109000503060303060001" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEAxS-00014q-NO for guix-devel@gnu.org; Wed, 30 Dec 2015 02:14:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEAxJ-0001Ko-Py for guix-devel@gnu.org; Wed, 30 Dec 2015 02:14:06 -0500 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:50193 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEAxJ-0001BE-32 for guix-devel@gnu.org; Wed, 30 Dec 2015 02:13:57 -0500 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id tBU7DoVD035960 for ; Wed, 30 Dec 2015 17:13:51 +1000 Received: from [192.168.1.105] (static.customers.nuskope.com.au [103.25.181.216] (may be forged)) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id tBU7Dn7E044440 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Wed, 30 Dec 2015 17:13:50 +1000 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: "guix-devel@gnu.org" This is a multi-part message in MIME format. --------------040109000503060303060001 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Guix, I've attached a patch for a simple rubygem. This one was slightly nasty because the gem for version 1.0.1 includes the .gem file for version 1.0.0, which means that 1.0.0 gets silently installed instead of the built and tested 1.0.1 .gem file - it is unlucky that "pkg/ruby-engine-1.0.0.gem" is lexicographically before "ruby-engine-1.0.1.gem". While I managed to install 1.0.1, I wasn't sure how best to remove the bundled 1.0.0 .gem file. The issue is that when the source is a .gem file (ie most of the time), the gemspec is taken from the downloaded .gem file directly, and in the same phase the .gem file is built. So as a packager there is no way to make changes to the gemspec without replacing the entire build phase. There's a number of rubygems that are contaminated with junk so it would be great for there to be a simple way to modify the gemspec before "gem build" is run. Would someone with more experience like to suggest a way of doing this? A new "gemspec" phase before "build" that takes the gemspec out of the .gem so the packager can manipulate it perhaps? It would also be good to check that there is only one .gem file. Thanks, ben --------------040109000503060303060001 Content-Type: text/x-patch; name="0001-gnu-Add-ruby-ruby-engine.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-Add-ruby-ruby-engine.patch" >From aeaf8255414669e5452647d800bf571b50699f29 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Wed, 30 Dec 2015 16:51:18 +1000 Subject: [PATCH] gnu: Add ruby-ruby-engine. * gnu/packages/ruby.scm (ruby-ruby-engine): New variable. --- gnu/packages/ruby.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index a3eafb1..b81eef4 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -2884,3 +2884,46 @@ programs to concentrate on the implementation of network protocols. It can be used to create both network servers and clients.") (home-page "http://rubyeventmachine.com") (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT + +(define-public ruby-ruby-engine + (package + (name "ruby-ruby-engine") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "ruby_engine" version)) + (sha256 + (base32 + "1d0sd4q50zkcqhr395wj1wpn2ql52r0fpwhzjfvi1bljml7k546v")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'clean-up + (lambda _ + (delete-file "Gemfile.lock") + (substitute* "ruby_engine.gemspec" + ;; Remove unnecessary imports that would entail further + ;; dependencies. + ((".*