diff options
Diffstat (limited to 'gnu/packages/protobuf.scm')
-rw-r--r-- | gnu/packages/protobuf.scm | 68 |
1 files changed, 61 insertions, 7 deletions
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm index 2e681ca97d..0e7c5f3244 100644 --- a/gnu/packages/protobuf.scm +++ b/gnu/packages/protobuf.scm @@ -25,17 +25,53 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) - #:use-module ((guix licenses) - #:select (bsd-2 bsd-3)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages compression) #:use-module (gnu packages gcc) + #:use-module (gnu packages libevent) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python)) +(define-public fstrm + (package + (name "fstrm") + (version "0.3.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://dl.farsightsecurity.com/dist/" name "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "1i9y8a1712aj80p5a1kcp378bnjrg3s2127q7304hklhmjcrjl1d")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libevent" ,libevent))) + (home-page "https://github.com/farsightsec/fstrm") + (synopsis "Implementation of the Frame Streams data transport protocol") + (description + "fstrm is an optimised implementation of Frame Streams as a C library and +several tools built on top of it. + +@dfn{Frame Streams} is a light-weight, binary-clean protocol that allows for +the transport of arbitrarily-encoded data payload sequences with minimal +framing overhead---just four bytes per data frame. It does not specify an +encoding format for these data frames and can be used with any data +serialisation format that produces byte sequences, such as Protocol Buffers, +XML, JSON, MessagePack, YAML, etc. + +Frame Streams can be used either as a streaming transport over a reliable byte +stream socket (TCP sockets, TLS connections, @code{AF_UNIX} sockets, etc.) for +data in motion, or as a file format for data at rest.") + (license (list license:asl2.0 + (license:non-copyleft #f "See libmy/argv*"))))) + (define-public protobuf (package (name "protobuf") - (version "3.4.1") + (version "3.5.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/google/protobuf/releases/" @@ -43,16 +79,34 @@ version ".tar.gz")) (sha256 (base32 - "0y6cr4l7bwa6zvjv5flzr4cx28shk5h8dz99xw90v8qih954pcrb")))) + "0lc5d5cnhsaiazc5gnsnv19bikk22rgcqlqzzrfvk6mkq98v1mld")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib))) + (outputs (list "out" + "static")) ; ~12 MiB of .a files + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.a$")) + #t)))))) (home-page "https://github.com/google/protobuf") (synopsis "Data encoding for remote procedure calls (RPCs)") (description "Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats.") - (license bsd-3))) + (license license:bsd-3))) ;; XXX Remove this old version when no other packages depend on it. (define-public protobuf-2 @@ -90,7 +144,7 @@ data serialization format. It includes @code{libprotobuf-c}, a pure C library that implements protobuf encoding and decoding, and @code{protoc-c}, a code generator that converts Protocol Buffer @code{.proto} files to C descriptor code.") - (license bsd-2))) + (license license:bsd-2))) (define-public python-protobuf (package @@ -111,7 +165,7 @@ code.") (description "Protocol buffers are a language-neutral, platform-neutral extensible mechanism for serializing structured data.") - (license bsd-3))) + (license license:bsd-3))) (define-public python2-protobuf (package-with-python2 python-protobuf)) |