gnu: conky: Update to 1.10.3.
[jackhill/guix/guix.git] / gnu / packages / conky.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages conky)
20 #:use-module (guix packages)
21 #:use-module (guix utils)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix build-system cmake)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (gnu packages fontutils)
27 #:use-module (gnu packages ncurses)
28 #:use-module (gnu packages lua)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages xorg))
31
32 (define-public conky
33 (package
34 (name "conky")
35 (version "1.10.3")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append "https://github.com/brndnmtthws/conky/archive/v"
40 version ".tar.gz"))
41 (file-name (string-append name "-" version ".tar.gz"))
42 (sha256
43 (base32 "1m9byrmpc2sprzk44v447yaqjzsvw230a0mlw7y1ngz3m3y44qs5"))))
44 (build-system cmake-build-system)
45 (arguments
46 `(#:tests? #f ; there are no tests
47 #:configure-flags
48 '("-DRELEASE=true"
49 ;; XXX: it checks ncurses with pkg-config.
50 ;; TODO: add 'ncurses.pc' to the ncurses package.
51 "-DBUILD_NCURSES=false")
52 #:phases
53 (alist-cons-after
54 'unpack 'add-freetype-to-search-path
55 (lambda* (#:key inputs #:allow-other-keys)
56 (substitute* "cmake/ConkyPlatformChecks.cmake"
57 (("set\\(INCLUDE_SEARCH_PATH")
58 (string-append
59 "set(INCLUDE_SEARCH_PATH "
60 (assoc-ref inputs "freetype") "/include/freetype2 ")))
61 #t)
62 (alist-replace
63 'install
64 (lambda* (#:key outputs #:allow-other-keys)
65 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
66 (mkdir-p bin)
67 (copy-file "src/conky" (string-append bin "/conky"))))
68 %standard-phases))))
69 (inputs
70 `(("freetype" ,freetype)
71 ("ncurses" ,ncurses)
72 ("libx11" ,libx11)
73 ("libxdamage" ,libxdamage)
74 ("libxft" ,libxft)
75 ("libxinerama" ,libxinerama)
76 ("lua" ,lua)))
77 (native-inputs
78 `(("pkg-config" ,pkg-config)))
79 (home-page "https://github.com/brndnmtthws/conky")
80 (synopsis "Lightweight system monitor for X")
81 (description
82 "Conky is a lightweight system monitor for X that displays operating
83 system statistics (CPU, disk, and memory usage, etc.) and more on the
84 desktop.")
85 (license license:gpl3+)))