summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2017-05-15 16:01:20 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-15 21:24:43 +0200
commit751f8582b5051c57a1c23b438d6a295902828fcf (patch)
treecd16bbfc96e6302b45f4e62805cf746ad195be9d
parent504c285d1092c9b7a2ef25c7a436da02bef70dc2 (diff)
downloadpatches-751f8582b5051c57a1c23b438d6a295902828fcf.tar
patches-751f8582b5051c57a1c23b438d6a295902828fcf.tar.gz
gnu: Add http-parser.
* gnu/packages/web.scm (http-parser): New variable.
-rw-r--r--gnu/packages/web.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index efaa1b5742..bcc20bfdde 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4552,3 +4552,35 @@ into your tests. It automatically starts up a HTTP server in a separate thread
(define-public python2-pytest-httpbin
(package-with-python2 python-pytest-httpbin))
+
+(define-public http-parser
+ (package
+ (name "http-parser")
+ (version "2.7.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/nodejs/http-parser/"
+ "archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1cw6nf8xy4jhib1w0jd2y0gpqjbdasg8b7pkl2k2vpp54k9rlh3h"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:make-flags
+ (list (string-append "PREFIX="
+ (assoc-ref %outputs "out"))
+ "CC=gcc" "library")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://github.com/nodejs/http-parser")
+ (synopsis "HTTP request/response parser for C")
+ (description "This is a parser for HTTP messages written in C. It parses
+both requests and responses. The parser is designed to be used in
+high-performance HTTP applications. It does not make any syscalls nor
+allocations, it does not buffer data, it can be interrupted at anytime.
+Depending on your architecture, it only requires about 40 bytes of data per
+message stream (in a web server that is per connection).")
+ (license l:expat)))