Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.4 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
  3. ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
  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 ntp)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages which)
  22. #:use-module (gnu packages linux)
  23. #:use-module (gnu packages pkg-config)
  24. #:use-module (gnu packages openssl)
  25. #:use-module ((guix licenses) #:prefix l:)
  26. #:use-module (guix packages)
  27. #:use-module (guix utils)
  28. #:use-module (guix download)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (srfi srfi-1))
  31. (define-public ntp
  32. (package
  33. (name "ntp")
  34. (version "4.2.8")
  35. (source (origin
  36. (method url-fetch)
  37. (uri (string-append
  38. "http://archive.ntp.org/ntp4/ntp-"
  39. (version-major+minor version)
  40. "/ntp-" version ".tar.gz"))
  41. (sha256
  42. (base32
  43. "1vnqa1542d01xmlkw8f3rq57y360b2j7yxkkg9b11955nvw0v4if"))))
  44. (native-inputs `(("which" ,which)
  45. ("pkg-config" ,pkg-config)))
  46. (inputs
  47. `(("openssl" ,openssl)
  48. ;; Build with POSIX capabilities support on GNU/Linux. This allows 'ntpd'
  49. ;; to run as non-root (when invoked with '-u'.)
  50. ,@(if (string-suffix? "-linux"
  51. (or (%current-target-system) (%current-system)))
  52. `(("libcap" ,libcap))
  53. '())))
  54. (build-system gnu-build-system)
  55. (synopsis "Real time clock synchonization system")
  56. (description "NTP is a system designed to synchronize the clocks of
  57. computers over a network.")
  58. (license (l:x11-style
  59. "http://www.eecis.udel.edu/~mills/ntp/html/copyright.html"
  60. "A non-copyleft free licence from the University of Delaware"))
  61. (home-page "http://www.ntp.org")))