gnu: Add xfconf.
[jackhill/guix/guix.git] / gnu / packages / polkit.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
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 polkit)
20 #:use-module ((guix licenses) #:select (lgpl2.0+ mpl2.0))
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system cmake)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages glib)
27 #:use-module (gnu packages linux)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages python)
31 #:use-module (gnu packages qt)
32 #:use-module (gnu packages xml))
33
34 (define-public mozjs
35 (package
36 (name "mozjs")
37 (version "17.0.0")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append
41 "https://ftp.mozilla.org/pub/mozilla.org/js/"
42 name version ".tar.gz"))
43 (sha256
44 (base32
45 "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij"))))
46 (build-system gnu-build-system)
47 (native-inputs
48 `(("perl", perl)
49 ("python" ,python-2)))
50 (arguments
51 `(#:phases
52 (alist-cons-before
53 'configure 'chdir
54 (lambda _
55 (chdir "js/src"))
56 (alist-replace
57 'configure
58 ;; configure fails if it is followed by SHELL and CONFIG_SHELL
59 (lambda* (#:key outputs #:allow-other-keys)
60 (let ((out (assoc-ref outputs "out")))
61 (setenv "SHELL" (which "sh"))
62 (setenv "CONFIG_SHELL" (which "sh"))
63 (zero? (system*
64 "./configure" (string-append "--prefix=" out)))))
65 %standard-phases))))
66 (home-page
67 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey")
68 (synopsis "Mozilla javascript engine")
69 (description "SpiderMonkey is Mozilla's JavaScript engine written
70 in C/C++.")
71 (license mpl2.0))) ; and others for some files
72
73 (define-public nspr
74 (package
75 (name "nspr")
76 (version "4.10.7")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append
80 "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
81 version "/src/nspr-" version ".tar.gz"))
82 (sha256
83 (base32
84 "0f1ri51yzjikigf6z31g03cdv6sgi9gw2c3vvv39psk3m37zb6iq"))))
85 (build-system gnu-build-system)
86 (native-inputs
87 `(("perl", perl)))
88 (arguments
89 `(#:tests? #f ; no check target
90 #:configure-flags
91 `("--enable-64bit")
92 #:phases
93 (alist-cons-before
94 'configure 'chdir
95 (lambda _
96 (chdir "nspr"))
97 %standard-phases)))
98 (home-page
99 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR")
100 (synopsis "Netscape API for system level and libc-like functions")
101 (description "Netscape Portable Runtime (NSPR) provides a
102 platform-neutral API for system level and libc-like functions. It is used
103 in the Mozilla clients.")
104 (license mpl2.0)))
105
106 (define-public polkit
107 (package
108 (name "polkit")
109 (version "0.112")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append
113 "http://www.freedesktop.org/software/polkit/releases/"
114 name "-" version ".tar.gz"))
115 (sha256
116 (base32
117 "1xkary7yirdcjdva950nqyhmsz48qhrdsr78zciahj27p8yg95fn"))
118 (patches (list (search-patch "polkit-drop-test.patch")))))
119 (build-system gnu-build-system)
120 (inputs
121 `(("expat" ,expat)
122 ("glib:bin" ,glib "bin") ; for glib-mkenums
123 ("intltool" ,intltool)
124 ("linux-pam" ,linux-pam)
125 ("mozjs" ,mozjs)
126 ("nspr" ,nspr)))
127 (propagated-inputs
128 `(("glib" ,glib))) ; required by polkit-gobject-1.pc
129 (native-inputs
130 `(("pkg-config", pkg-config)))
131 (home-page "http://www.freedesktop.org/wiki/Software/polkit/")
132 (synopsis "Authorization API for privilege management")
133 (description "Polkit is an application-level toolkit for defining and
134 handling the policy that allows unprivileged processes to speak to
135 privileged processes. It is a framework for centralizing the decision
136 making process with respect to granting access to privileged operations
137 for unprivileged applications.")
138 (license lgpl2.0+)))
139
140 (define-public polkit-qt
141 (package
142 (name "polkit-qt")
143 (version "1-0.112.0")
144 (source (origin
145 (method url-fetch)
146 (uri (string-append
147 "http://download.kde.org/stable/apps/KDE4.x/admin/"
148 name "-" version ".tar.bz2"))
149 (sha256
150 (base32
151 "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7"))))
152 (build-system cmake-build-system)
153 (inputs
154 `(("polkit" ,polkit)))
155 (propagated-inputs
156 `(("qt" ,qt-4))) ; according to the pkg-config files
157 (native-inputs
158 `(("pkg-config", pkg-config)))
159 (arguments
160 `(#:tests? #f)) ; there is a test subdirectory, but no test target
161 (home-page "http://api.kde.org/kdesupport-api/polkit-qt-1-apidocs/")
162 (synopsis "Qt frontend to the polkit library")
163 (description "Polkit-qt is a library that lets developers use the
164 PolicyKit API through a Qt-styled API. It is mainly a wrapper around
165 QAction and QAbstractButton that lets you integrate those two component
166 easily with PolicyKit.")
167 (license lgpl2.0+)))