>From 8e9997429cb70c04d269516032e7d3b292d5ae95 Mon Sep 17 00:00:00 2001 From: Roel Janssen <r...@gnu.org> 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 <rek...@elephly.net> ;;; Copyright © 2016 Leo Famulari <l...@famulari.name> +;;; Copyright © 2016 Roel Janssen <r...@gnu.org> ;;; ;;; 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
Ricardo Wurmus writes: > Hi Roel, > >> Ricardo Wurmus writes: >> >>> Roel Janssen <r...@gnu.org> 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