unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add xz-java.
@ 2016-03-31 21:34 Roel Janssen
  2016-04-01  9:42 ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-03-31 21:34 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-xz-java.patch --]
[-- Type: text/x-patch, Size: 2461 bytes --]

From dc0367cf4e3da72e1b1b68ace26216c31e0c6f6c Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Thu, 31 Mar 2016 23:27:26 +0200
Subject: [PATCH] gnu: Add xz-java.

* gnu/packages/java.scm (xz-java): New variable.
---
 gnu/packages/java.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 9b6a647..be20795 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -23,6 +23,7 @@
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ant)
   #:use-module (gnu packages)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
@@ -742,3 +743,42 @@ build process and its dependencies, whereas Make uses Makefile format.")
                  '("openjdk6-src")))))))
 
 (define-public icedtea icedtea-7)
+
+(define-public xz-java
+  (package
+   (name "xz-java")
+   (version "1.5")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "http://tukaani.org/xz/"
+                                 name "-" version ".zip"))
+             (sha256
+              (base32
+               "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
+   (build-system ant-build-system)
+   (arguments
+    `(#:tests? #f ; There are no tests to run.
+      #:phases
+      (modify-phases %standard-phases
+        (replace 'unpack
+          (lambda _
+            (mkdir-p "source")
+            (chdir "source")
+            (zero? (system* "unzip" (assoc-ref %build-inputs "source")))))
+        (replace 'install
+          (lambda _
+            (let* ((out (assoc-ref %outputs "out"))
+                   (bin (string-append out "/share/java/xz/"))
+                   (out-file (string-append bin ,name "-" ,version ".jar")))
+              (mkdir-p bin)
+              (copy-file "build/jar/xz.jar" out-file)))))))
+   (propagated-inputs
+    `(("icedtea" ,icedtea "jdk")))
+   (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.5.5


[-- Attachment #2: Type: text/plain, Size: 578 bytes --]

Dear Guix,

First, thank you Ricardo for pushing the ant-build-system fix.
Now that my package works and can be built reproducibly I would
like to add it to GNU Guix.

Along with the library (xz-1.5.jar), the build produces some demos that
can be run directly with "java -jar <demo-jar-file>".  I didn't include
those in the build because I believe it's only the library we are
interested in here.  I don't have any other argument to leave them out,
so if I should include the demo jar files as well, please let me know.

Thanks again for your time.

Kind regards,
Roel Janssen

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-03-31 21:34 [PATCH] gnu: Add xz-java Roel Janssen
@ 2016-04-01  9:42 ` Ricardo Wurmus
  2016-04-01 11:25   ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-04-01  9:42 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Hi Roel,

> Along with the library (xz-1.5.jar), the build produces some demos that
> can be run directly with "java -jar <demo-jar-file>".  I didn't include
> those in the build because I believe it's only the library we are
> interested in here.  I don't have any other argument to leave them out,
> so if I should include the demo jar files as well, please let me know.

That’s okay.

> From dc0367cf4e3da72e1b1b68ace26216c31e0c6f6c Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@gnu.org>
> Date: Thu, 31 Mar 2016 23:27:26 +0200
> Subject: [PATCH] gnu: Add xz-java.

> * gnu/packages/java.scm (xz-java): New variable.
> ---
>  gnu/packages/java.scm | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)

> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 9b6a647..be20795 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -23,6 +23,7 @@
>    #:use-module (guix download)
>    #:use-module (guix utils)
>    #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system ant)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages attr)
>    #:use-module (gnu packages autotools)
> @@ -742,3 +743,42 @@ build process and its dependencies, whereas Make uses Makefile format.")
>                   '("openjdk6-src")))))))
 
>  (define-public icedtea icedtea-7)
> +
> +(define-public xz-java
> +  (package
> +   (name "xz-java")
> +   (version "1.5")
> +   (source (origin
> +             (method url-fetch)
> +             (uri (string-append "http://tukaani.org/xz/"
> +                                 name "-" version ".zip"))
> +             (sha256
> +              (base32
> +               "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
> +   (build-system ant-build-system)
> +   (arguments
> +    `(#:tests? #f ; There are no tests to run.
> +      #:phases
> +      (modify-phases %standard-phases
> +        (replace 'unpack
> +          (lambda _
> +            (mkdir-p "source")
> +            (chdir "source")
> +            (zero? (system* "unzip" (assoc-ref %build-inputs "source")))))

Why is this necessary?  The unpack phase can deal with zip files just
fine.

> +        (replace 'install
> +          (lambda _
> +            (let* ((out (assoc-ref %outputs "out"))
> +                   (bin (string-append out "/share/java/xz/"))
> +                   (out-file (string-append bin ,name "-" ,version ".jar")))
> +              (mkdir-p bin)
> +              (copy-file "build/jar/xz.jar" out-file)))))))

I wonder if maybe it would be better to just use a generated default
build.xml instead of replacing the install phase.

> +   (propagated-inputs
> +    `(("icedtea" ,icedtea "jdk")))

I think we should avoid propagating the JDK (or even the JRE).

> +   (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)))

Okay!

Here’s how I’d do it.  What do you think?


(define-public xz-java
  (package
   (name "xz-java")
   (version "1.5")
   (source (origin
             (method url-fetch)
             (uri (string-append "http://tukaani.org/xz/"
                                 name "-" version ".zip"))
             (sha256
              (base32
               "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
   (build-system ant-build-system)
   (arguments
    `(#:tests? #f ; There are no tests to run.
      #:jar-name "xz.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)))


~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-04-01  9:42 ` Ricardo Wurmus
@ 2016-04-01 11:25   ` Roel Janssen
  2016-04-01 12:45     ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-04-01 11:25 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-xz-java.patch --]
[-- Type: text/x-patch, Size: 2052 bytes --]

From eb4c2cd850626aa6fc88f355964ec4b7f74a2add Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Fri, 1 Apr 2016 13:06:21 +0200
Subject: [PATCH] gnu: Add xz-java.

* gnu/packages/java.scm (xz-java): 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 9b6a647..8df1b73 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -23,6 +23,7 @@
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ant)
   #:use-module (gnu packages)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
@@ -742,3 +743,32 @@ build process and its dependencies, whereas Make uses Makefile format.")
                  '("openjdk6-src")))))))
 
 (define-public icedtea icedtea-7)
+
+(define-public xz-java
+  (package
+   (name "xz-java")
+   (version "1.5")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "http://tukaani.org/xz/"
+                                 name "-" version ".zip"))
+             (sha256
+              (base32
+               "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
+   (build-system ant-build-system)
+   (arguments
+    `(#:tests? #f ; There are no tests to run.
+      #:jar-name "xz-1.5.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.5.5


[-- Attachment #2: Type: text/plain, Size: 4135 bytes --]

Hello Ricardo,

Ricardo Wurmus writes:

>>  (define-public icedtea icedtea-7)
>> +
>> +(define-public xz-java
>> +  (package
>> +   (name "xz-java")
>> +   (version "1.5")
>> +   (source (origin
>> +             (method url-fetch)
>> +             (uri (string-append "http://tukaani.org/xz/"
>> +                                 name "-" version ".zip"))
>> +             (sha256
>> +              (base32
>> +               "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
>> +   (build-system ant-build-system)
>> +   (arguments
>> +    `(#:tests? #f ; There are no tests to run.
>> +      #:phases
>> +      (modify-phases %standard-phases
>> +        (replace 'unpack
>> +          (lambda _
>> +            (mkdir-p "source")
>> +            (chdir "source")
>> +            (zero? (system* "unzip" (assoc-ref %build-inputs "source")))))
>
> Why is this necessary?  The unpack phase can deal with zip files just
> fine.

I wanted to unpack in a subdirectory ("source").  I see your solution
leaves the unpack phase alone and simply backs up a directory so the
next phase will work well.  Your solution seems better than mine, so
thanks for the suggestion!  I applied your solution in the new version
of the patch.

>> +        (replace 'install
>> +          (lambda _
>> +            (let* ((out (assoc-ref %outputs "out"))
>> +                   (bin (string-append out "/share/java/xz/"))
>> +                   (out-file (string-append bin ,name "-" ,version ".jar")))
>> +              (mkdir-p bin)
>> +              (copy-file "build/jar/xz.jar" out-file)))))))
>
> I wonder if maybe it would be better to just use a generated default
> build.xml instead of replacing the install phase.

I agree.

>> +   (propagated-inputs
>> +    `(("icedtea" ,icedtea "jdk")))
>
> I think we should avoid propagating the JDK (or even the JRE).

Err, you are right.  This was probably a leftover from
pre-ant-build-system.

>> +   (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)))
>
> Okay!
>
> Here’s how I’d do it.  What do you think?
>
>
> (define-public xz-java
>   (package
>    (name "xz-java")
>    (version "1.5")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append "http://tukaani.org/xz/"
>                                  name "-" version ".zip"))
>              (sha256
>               (base32
>                "0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:tests? #f ; There are no tests to run.
>       #:jar-name "xz.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)))

Your version doesn't override the unpack and install phases.
That's really good.

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.

Thank you for providing the practical example of how to package more
efficiently.

I tested your version with the file naming change, and it works (as
expected).  I attached the new version of this patch, which is your
provided example, with a minor change in #:jar-name.

Thanks!

Kind regards,
Roel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-04-01 11:25   ` Roel Janssen
@ 2016-04-01 12:45     ` Ricardo Wurmus
  2016-04-04 12:32       ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-04-01 12:45 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Roel Janssen <roel@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.

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.

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-04-01 12:45     ` Ricardo Wurmus
@ 2016-04-04 12:32       ` Roel Janssen
  2016-04-26 14:53         ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-04-04 12:32 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel


Ricardo Wurmus writes:

> Roel Janssen <roel@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.

Thanks for your time.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-04-04 12:32       ` Roel Janssen
@ 2016-04-26 14:53         ` Ricardo Wurmus
  2016-04-26 22:03           ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-04-26 14:53 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Hi Roel,

> Ricardo Wurmus writes:
>
>> Roel Janssen <roel@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)?

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-04-26 14:53         ` Ricardo Wurmus
@ 2016-04-26 22:03           ` Roel Janssen
  2016-04-27  9:04             ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-04-26 22:03 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- Attachment #1: 0001-gnu-Add-java-xz.patch --]
[-- Type: text/x-patch, Size: 2313 bytes --]

From 8e9997429cb70c04d269516032e7d3b292d5ae95 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@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 <rekado@elephly.net>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 Roel Janssen <roel@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


[-- Attachment #2: Type: text/plain, Size: 1543 bytes --]


Ricardo Wurmus writes:

> Hi Roel,
>
>> Ricardo Wurmus writes:
>>
>>> Roel Janssen <roel@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: Add xz-java.
  2016-04-26 22:03           ` Roel Janssen
@ 2016-04-27  9:04             ` Ricardo Wurmus
  0 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2016-04-27  9:04 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Roel Janssen <roel@gnu.org> writes:

> Ricardo Wurmus writes:
>
>> Hi Roel,
>>
>>> Ricardo Wurmus writes:
>>>
>>>> Roel Janssen <roel@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.

Thank you!  I pushed it to master.

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-27  9:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 21:34 [PATCH] gnu: Add xz-java Roel Janssen
2016-04-01  9:42 ` Ricardo Wurmus
2016-04-01 11:25   ` Roel Janssen
2016-04-01 12:45     ` Ricardo Wurmus
2016-04-04 12:32       ` Roel Janssen
2016-04-26 14:53         ` Ricardo Wurmus
2016-04-26 22:03           ` Roel Janssen
2016-04-27  9:04             ` Ricardo Wurmus

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).