rrdtool.scm 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 (guix git-download)
  21. #:use-module (gnu packages)
  22. #:use-module (gnu packages algebra)
  23. #:use-module (gnu packages base)
  24. #:use-module (gnu packages fontutils)
  25. #:use-module (gnu packages glib)
  26. #:use-module (gnu packages groff)
  27. #:use-module (gnu packages gtk)
  28. #:use-module (gnu packages perl)
  29. #:use-module (gnu packages pkg-config)
  30. #:use-module (gnu packages python)
  31. #:use-module (gnu packages xml)
  32. #:use-module (guix build-system gnu)
  33. #:use-module (guix download)
  34. #:use-module (guix gexp)
  35. #:use-module ((guix licenses) #:prefix license:)
  36. #:use-module (guix packages))
  37. (define-public rrdtool
  38. (package
  39. (name "rrdtool")
  40. (version "1.8.0")
  41. (source (origin
  42. (method git-fetch)
  43. (uri (git-reference
  44. (url "https://github.com/oetiker/rrdtool-1.x")
  45. (commit (string-append "v" version))))
  46. (file-name (git-file-name name version))
  47. (sha256
  48. (base32
  49. "04dhygsp34dykrnbbcqni5f7hih0hzqbnj6d2sl439lqbx9k3q3b"))))
  50. (build-system gnu-build-system)
  51. (inputs
  52. (list cairo
  53. freetype
  54. glib
  55. gtk+-2
  56. libxml2
  57. pango
  58. python))
  59. (native-inputs
  60. (list groff
  61. pkg-config
  62. ;; For tests.
  63. bc
  64. perl ; will also build Perl bindings
  65. tzdata-for-tests))
  66. (arguments
  67. (list
  68. #:disallowed-references (list (gexp-input tzdata-for-tests))
  69. #:phases
  70. #~(modify-phases %standard-phases
  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 _
  77. (let ((examples (string-append #$output
  78. "/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. (home-page "https://oss.oetiker.ch/rrdtool/")
  84. (synopsis "Time-series data storage and display system")
  85. (description
  86. "The Round Robin Database Tool (RRDtool) is a system to store and display
  87. time-series data (e.g. network bandwidth, machine-room temperature, server
  88. load average). It stores the data in Round Robin Databases (RRDs), a very
  89. compact way that will not expand over time. RRDtool processes the extracted
  90. data to enforce a certain data density, allowing for useful graphical
  91. representation of data values.")
  92. (license license:gpl2+))) ; with license exception that allows combining
  93. ; with many other licenses.