From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: Re: [PATCH] gnu: Add xz-java. Date: Wed, 27 Apr 2016 00:03:52 +0200 Message-ID: <87a8kg10zb.fsf@gnu.org> References: <87y48yxrew.fsf@gnu.org> <87wpoh1sfz.fsf@gnu.org> <874mbhd05y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avB5W-0000h5-1G for guix-devel@gnu.org; Tue, 26 Apr 2016 18:04:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avB5S-0004In-Qs for guix-devel@gnu.org; Tue, 26 Apr 2016 18:04:09 -0400 In-reply-to: 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" To: Ricardo Wurmus Cc: guix-devel@gnu.org --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-java-xz.patch Content-Transfer-Encoding: 8bit >From 8e9997429cb70c04d269516032e7d3b292d5ae95 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 27 Apr 2016 00:00:44 +0200 Subject: [PATCH] gnu: Add java-xz. * gnu/packages/java.scm (java-xz): New variable. --- gnu/packages/java.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a81312b..527c093 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2016 Roel Janssen ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix build-system ant) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages attr) @@ -829,3 +831,31 @@ build process and its dependencies, whereas Make uses Makefile format.") "jdk-drop" "langtools-drop" "hotspot-drop"))))))) (define-public icedtea icedtea-7) + +(define-public java-xz + (package + (name "java-xz") + (version "1.5") + (source (origin + (method url-fetch) + (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip")) + (sha256 + (base32 + "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; There are no tests to run. + #:jar-name ,(string-append "xz-" version ".jar") + #:phases + (modify-phases %standard-phases + ;; The unpack phase enters the "maven" directory by accident. + (add-after 'unpack 'chdir + (lambda _ (chdir "..") #t))))) + (native-inputs + `(("unzip" ,unzip))) + (home-page "http://tukaani.org/xz/java.html") + (synopsis "Implementation of XZ data compression in pure Java") + (description "This library aims to be a complete implementation of XZ data +compression in pure Java. Single-threaded streamed compression and +decompression and random access decompression have been fully implemented.") + (license license:public-domain))) -- 2.7.4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Ricardo Wurmus writes: > Hi Roel, > >> Ricardo Wurmus writes: >> >>> Roel Janssen writes: >>> >>>> One minor detail is the filename of the jar. I renamed it to >>>> "xz-1.5.jar", which I think is the "standard" file naming scheme for our >>>> Java packages. >>> >>> I think it’s a bit ugly because we have the version number in the target >>> directory already, but I realise that this is how the jar is originally >>> named, so I think that’s okay. >> >> The jar is originally named "xz.jar". I thought other Java packages >> included the version number in the filename, so I just followed this >> practice. >> >> Either "xz.jar" or "xz-1.5.jar" is fine with me. >> >>> However, we should not hardcode the version string. Instead we should >>> do something like this (untested): >>> >>> #:jar-name ,(string-append "xz-" version ".jar") >>> >>> What do you think? If this works for you I’ll commit your patch with >>> this change. >> >> I've just tested it and it works. Since you're better at making a >> stylistic decision, I want to leave it up to you whether you want to >> append the version number or not. Both ways are fine with me. > > I forgot to reply to this message and I no longer remember what we > should do. Do you have an updated patch for “java-xz” (with or without > version number)? Yes, here it is. So, I renamed it to "java-xz" due to the naming conventions. I applied your suggestion of making the version a variable in the #:jar-name field. Thanks! Kind regards, Roel Janssen --=-=-=--