gnu: Add nspr.
[jackhill/guix/guix.git] / gnu / packages / polkit.scm
CommitLineData
cff1c5c1
AE
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 gnu)
24 #:use-module (gnu packages perl)
25 #:use-module (gnu packages python))
26
27(define-public mozjs
28 (package
29 (name "mozjs")
30 (version "17.0.0")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append
34 "https://ftp.mozilla.org/pub/mozilla.org/js/"
35 name version ".tar.gz"))
36 (sha256
37 (base32
38 "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij"))))
39 (build-system gnu-build-system)
40 (native-inputs
41 `(("perl", perl)
42 ("python" ,python-2)))
43 (arguments
44 `(#:phases
45 (alist-cons-before
46 'configure 'chdir
47 (lambda _
48 (chdir "js/src"))
49 (alist-replace
50 'configure
51 ;; configure fails if it is followed by SHELL and CONFIG_SHELL
52 (lambda* (#:key outputs #:allow-other-keys)
53 (let ((out (assoc-ref outputs "out")))
54 (setenv "SHELL" (which "sh"))
55 (setenv "CONFIG_SHELL" (which "sh"))
56 (zero? (system*
57 "./configure" (string-append "--prefix=" out)))))
58 %standard-phases))))
59 (home-page
60 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey")
61 (synopsis "Mozilla javascript engine")
62 (description "SpiderMonkey is Mozilla's JavaScript engine written
63in C/C++.")
64 (license mpl2.0))) ; and others for some files
922ea806
AE
65
66(define-public nspr
67 (package
68 (name "nspr")
69 (version "4.10.7")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append
73 "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
74 version "/src/nspr-" version ".tar.gz"))
75 (sha256
76 (base32
77 "0f1ri51yzjikigf6z31g03cdv6sgi9gw2c3vvv39psk3m37zb6iq"))))
78 (build-system gnu-build-system)
79 (native-inputs
80 `(("perl", perl)))
81 (arguments
82 `(#:tests? #f ; no check target
83 #:configure-flags
84 `("--enable-64bit")
85 #:phases
86 (alist-cons-before
87 'configure 'chdir
88 (lambda _
89 (chdir "nspr"))
90 %standard-phases)))
91 (home-page
92 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR")
93 (synopsis "Netscape API for system level and libc-like functions")
94 (description "Netscape Portable Runtime (NSPR) provides a
95platform-neutral API for system level and libc-like functions. It is used
96in the Mozilla clients.")
97 (license mpl2.0)))