gnu: calibre: Build with non-modular Qt.
[jackhill/guix/guix.git] / gnu / packages / protobuf.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages protobuf)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix build-system python)
26 #:use-module ((guix licenses)
27 #:select (bsd-3))
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gcc)
30 #:use-module (gnu packages python))
31
32 (define-public protobuf
33 (package
34 (name "protobuf")
35 (version "2.5.0")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "http://protobuf.googlecode.com/files/protobuf-"
39 version ".tar.bz2"))
40 (sha256
41 (base32
42 "0xxn9gxhvsgzz2sgmihzf6pf75clr05mqj6218camwrwajpcbgqk"))))
43 (build-system gnu-build-system)
44 (inputs `(("zlib" ,zlib)))
45 (home-page "http://code.google.com/p/protobuf/")
46 (synopsis "Data encoding for remote procedure calls (RPCs)")
47 (description
48 "Protocol Buffers are a way of encoding structured data in an efficient
49 yet extensible format. Google uses Protocol Buffers for almost all of its
50 internal RPC protocols and file formats.")
51 (license bsd-3)))
52
53 (define-public python-protobuf
54 (package
55 (name "python-protobuf")
56 (version "3.0.0b4")
57 (source
58 (origin
59 (method url-fetch)
60 (uri (pypi-uri "protobuf" version))
61 (sha256
62 (base32
63 "18zvvn8cgbcwi85ws2ny0k4qp33wd525spsb8sxvrj325mbx9cpk"))))
64 (build-system python-build-system)
65 (inputs
66 `(("python-six" ,python-six)))
67 (home-page "https://github.com/google/protobuf")
68 (synopsis "Protocol buffers is a data interchange format")
69 (description
70 "Protocol buffers are a language-neutral, platform-neutral extensible
71 mechanism for serializing structured data.")
72 (license bsd-3)
73 (properties `((python2-variant . ,(delay python2-protobuf))))))
74
75 (define-public python2-protobuf
76 (package (inherit (package-with-python2
77 (strip-python2-variant python-protobuf)))
78 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))