Merge branch 'master' into staging
[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.6")
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 "1jk0my7z45vz9vd8958d27nkk4kvr53k7wyf6cz2x9xjc0lri02c"))))
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 (modify-phases %standard-phases
54 (add-after '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 (replace 'install
63 (lambda* (#:key outputs #:allow-other-keys)
64 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
65 (mkdir-p bin)
66 (install-file "src/conky" bin))
67 #t)))))
68 (inputs
69 `(("freetype" ,freetype)
70 ("ncurses" ,ncurses)
71 ("libx11" ,libx11)
72 ("libxdamage" ,libxdamage)
73 ("libxft" ,libxft)
74 ("libxinerama" ,libxinerama)
75 ("lua" ,lua)))
76 (native-inputs
77 `(("pkg-config" ,pkg-config)))
78 (home-page "https://github.com/brndnmtthws/conky")
79 (synopsis "Lightweight system monitor for X")
80 (description
81 "Conky is a lightweight system monitor for X that displays operating
82 system statistics (CPU, disk, and memory usage, etc.) and more on the
83 desktop.")
84 (license license:gpl3+)))