diff mbox series

[bug#62797] gnu: rrdtool: Update to 1.8.0.

Message ID 875ya1kre4.fsf@posteo.org
State New
Headers show
Series [bug#62797] gnu: rrdtool: Update to 1.8.0. | expand

Commit Message

Aleksandr Vityazev April 12, 2023, 4:16 p.m. UTC
* gnu/packages/rrdtool.scm (rrdtool): Update to 1.8.0.
[source]: Change uri, github is the primary distribution point;
[inputs]: Use new style;
[arguments]: Use gexps, remove 'pre-configure phase.
Add (guix gexp) to #:use-modules.
---
 gnu/packages/rrdtool.scm | 59 +++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 31 deletions(-)

Comments

Nicolas Goaziou May 3, 2023, 12:35 p.m. UTC | #1
Hello,

Aleksandr Vityazev <avityazev@posteo.org> writes:

> * gnu/packages/rrdtool.scm (rrdtool): Update to 1.8.0.
> [source]: Change uri, github is the primary distribution point;
> [inputs]: Use new style;
> [arguments]: Use gexps, remove 'pre-configure phase.
> Add (guix gexp) to #:use-modules.

Thank you.

It is usually better for review to separate version bump from style
change.

I applied your patch with the fix below.

>  (define-public rrdtool
>    (package
>      (name "rrdtool")
> -    (version "1.7.2")
> +    (version "1.8.0")
>      (source (origin
>                (method url-fetch)
> -              (uri (string-append "http://oss.oetiker.ch/rrdtool/pub/rrdtool-"
> +              (uri (string-append "https://github.com/oetiker/rrdtool-1.x/"
> +                                  "archive/refs/tags/v"

Guix doesn't use these URL, as reported by "guix lint", because the
tarball there is not stable. So I used "git-fetch" instead.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/rrdtool.scm b/gnu/packages/rrdtool.scm
index 1fb642216d..ca11eac8bd 100644
--- a/gnu/packages/rrdtool.scm
+++ b/gnu/packages/rrdtool.scm
@@ -31,29 +31,31 @@  (define-module (gnu packages rrdtool)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
 (define-public rrdtool
   (package
     (name "rrdtool")
-    (version "1.7.2")
+    (version "1.8.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://oss.oetiker.ch/rrdtool/pub/rrdtool-"
+              (uri (string-append "https://github.com/oetiker/rrdtool-1.x/"
+                                  "archive/refs/tags/v"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1nsqra0g2nja19akmf9x5y9hhgc35ml3w9dcdz2ayz7zgvmzm6d1"))))
+                "1k2r0n6xvw3bqqn17kvqca0pby9s0gy5k149mz8wzl31a5j9m9c8"))))
     (build-system gnu-build-system)
     (inputs
-     `(("cairo" ,cairo)
-       ("freetype" ,freetype)
-       ("glib" ,glib)
-       ("gtk" ,gtk+-2)
-       ("libxml2" ,libxml2)
-       ("pango" ,pango)
-       ("python" ,python)))
+     (list cairo
+           freetype
+           glib
+           gtk+-2
+           libxml2
+           pango
+           python))
     (native-inputs
      (list groff
            pkg-config
@@ -62,27 +64,22 @@  (define-public rrdtool
            perl ; will also build Perl bindings
            tzdata-for-tests))
     (arguments
-     `(#:disallowed-references (,tzdata-for-tests)
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'pre-configure
-           (lambda _
-             (substitute* "libtool"
-               (("/bin/sed") (which "sed")))
-             #t))
-         (add-before 'check 'prepare-test-environment
-           (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "TZDIR"
-                     (search-input-directory inputs "share/zoneinfo"))))
-         (add-after 'install 'remove-native-input-references
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (examples (string-append out "/share/rrdtool/examples")))
-               ;; Drop shebangs from examples to avoid depending on native-input
-               ;; perl.  It's clear from context and extension how to run them.
-               (substitute* (find-files examples "\\.pl$")
-                 (("^#!.*") ""))
-               #t))))))
+     (list
+      #:disallowed-references (list (gexp-input tzdata-for-tests))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'prepare-test-environment
+            (lambda* (#:key inputs #:allow-other-keys)
+              (setenv "TZDIR"
+                      (search-input-directory inputs "share/zoneinfo"))))
+          (add-after 'install 'remove-native-input-references
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (examples (string-append out "/share/rrdtool/examples")))
+                ;; Drop shebangs from examples to avoid depending on native-input
+                ;; perl.  It's clear from context and extension how to run them.
+                (substitute* (find-files examples "\\.pl$")
+                  (("^#!.*") ""))))))))
     (home-page "https://oss.oetiker.ch/rrdtool/")
     (synopsis "Time-series data storage and display system")
     (description