rrdtool.scm 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
  3. ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages rrdtool)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages algebra)
  22. #:use-module (gnu packages base)
  23. #:use-module (gnu packages fontutils)
  24. #:use-module (gnu packages glib)
  25. #:use-module (gnu packages groff)
  26. #:use-module (gnu packages gtk)
  27. #:use-module (gnu packages perl)
  28. #:use-module (gnu packages pkg-config)
  29. #:use-module (gnu packages python)
  30. #:use-module (gnu packages xml)
  31. #:use-module (guix build-system gnu)
  32. #:use-module (guix download)
  33. #:use-module ((guix licenses) #:prefix license:)
  34. #:use-module (guix packages))
  35. (define-public rrdtool
  36. (package
  37. (name "rrdtool")
  38. (version "1.7.1")
  39. (source (origin
  40. (method url-fetch)
  41. (uri (string-append "http://oss.oetiker.ch/rrdtool/pub/rrdtool-"
  42. version ".tar.gz"))
  43. (sha256
  44. (base32
  45. "1bhsg119j94xwykp2sbp01hhxcg78gzblfn7j98slrv9va77g6wq"))))
  46. (build-system gnu-build-system)
  47. (inputs
  48. `(("cairo" ,cairo)
  49. ("freetype" ,freetype)
  50. ("glib" ,glib)
  51. ("gtk" ,gtk+-2)
  52. ("libxml2" ,libxml2)
  53. ("pango" ,pango)
  54. ("python" ,python-2)))
  55. (native-inputs
  56. `(("groff" ,groff)
  57. ("pkg-config" ,pkg-config)
  58. ;; For tests.
  59. ("bc" ,bc)
  60. ("perl" ,perl) ; will also build Perl bindings
  61. ("tzdata" ,tzdata-for-tests)))
  62. (arguments
  63. '(#:phases
  64. (modify-phases %standard-phases
  65. (add-before 'configure 'pre-configure
  66. (lambda _
  67. (substitute* "libtool"
  68. (("/bin/sed") (which "sed")))
  69. #t))
  70. (add-before 'check 'prepare-test-environment
  71. (lambda* (#:key inputs #:allow-other-keys)
  72. (setenv "TZDIR"
  73. (string-append (assoc-ref inputs "tzdata")
  74. "/share/zoneinfo"))
  75. #t))
  76. (add-after 'install 'remove-native-input-references
  77. (lambda* (#:key outputs #:allow-other-keys)
  78. (let* ((out (assoc-ref outputs "out"))
  79. (examples (string-append out "/share/rrdtool/examples")))
  80. ;; Drop shebangs from examples to avoid depending on native-input
  81. ;; perl. It's clear from context and extension how to run them.
  82. (substitute* (find-files examples "\\.pl$")
  83. (("^#!.*") ""))
  84. #t))))))
  85. (home-page "https://oss.oetiker.ch/rrdtool/")
  86. (synopsis "Time-series data storage and display system")
  87. (description
  88. "The Round Robin Database Tool (RRDtool) is a system to store and display
  89. time-series data (e.g. network bandwidth, machine-room temperature, server
  90. load average). It stores the data in Round Robin Databases (RRDs), a very
  91. compact way that will not expand over time. RRDtool processes the extracted
  92. data to enforce a certain data density, allowing for useful graphical
  93. representation of data values.")
  94. (license license:gpl2+))) ; with license exception that allows combining
  95. ; with many other licenses.