rrdtool.scm 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
  3. ;;; Copyright © 2018, 2019, 2020 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.2")
  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. "1nsqra0g2nja19akmf9x5y9hhgc35ml3w9dcdz2ayz7zgvmzm6d1"))))
  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)))
  55. (native-inputs
  56. (list groff
  57. pkg-config
  58. ;; For tests.
  59. bc
  60. perl ; will also build Perl bindings
  61. tzdata-for-tests))
  62. (arguments
  63. `(#:disallowed-references (,tzdata-for-tests)
  64. #:phases
  65. (modify-phases %standard-phases
  66. (add-before 'configure 'pre-configure
  67. (lambda _
  68. (substitute* "libtool"
  69. (("/bin/sed") (which "sed")))
  70. #t))
  71. (add-before 'check 'prepare-test-environment
  72. (lambda* (#:key inputs #:allow-other-keys)
  73. (setenv "TZDIR"
  74. (search-input-directory inputs "share/zoneinfo"))))
  75. (add-after 'install 'remove-native-input-references
  76. (lambda* (#:key outputs #:allow-other-keys)
  77. (let* ((out (assoc-ref outputs "out"))
  78. (examples (string-append out "/share/rrdtool/examples")))
  79. ;; Drop shebangs from examples to avoid depending on native-input
  80. ;; perl. It's clear from context and extension how to run them.
  81. (substitute* (find-files examples "\\.pl$")
  82. (("^#!.*") ""))
  83. #t))))))
  84. (home-page "https://oss.oetiker.ch/rrdtool/")
  85. (synopsis "Time-series data storage and display system")
  86. (description
  87. "The Round Robin Database Tool (RRDtool) is a system to store and display
  88. time-series data (e.g. network bandwidth, machine-room temperature, server
  89. load average). It stores the data in Round Robin Databases (RRDs), a very
  90. compact way that will not expand over time. RRDtool processes the extracted
  91. data to enforce a certain data density, allowing for useful graphical
  92. representation of data values.")
  93. (license license:gpl2+))) ; with license exception that allows combining
  94. ; with many other licenses.