diff mbox series

[bug#39587,v2] gnu: Add haproxy.

Message ID 20200213124909.21523-1-brice@waegenei.re
State Accepted
Headers show
Series [bug#39587,v2] gnu: Add haproxy. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Brice Waegeneire Feb. 13, 2020, 12:49 p.m. UTC
* gnu/packages/networking.scm (haproxy): New variable.
---

Keep haproxy binary in /sbin, add lgpl2.1+ license and explain why the test
are disabled.

 gnu/packages/networking.scm | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Comments

Jelle Licht Feb. 14, 2020, 3:54 p.m. UTC | #1
Hey Brice,

I pushed your commit as 96945cabe038cd02c2d76e8821d264626fcc999a to
master with the following cosmetic nitpicks:

Brice Waegeneire <brice@waegenei.re> writes:

> [...]
> +    (arguments
> +     `(#:make-flags
> +       (let* ((out (assoc-ref %outputs "out")))
> +         (list (string-append "PREFIX=" out)
> +               (string-append "DOCDIR=" out "/share/" ,name)
> +               "TARGET=linux-glibc"
> +               "USE_LUA=1"
> +               "USE_OPENSSL=1"
> +               "USE_ZLIB=1"
> +               "USE_PCRE_2=1"))
> +       #:tests? #f  ; there is only regression tests, using varnishtest
                               ^are
> [...]
> +    (description "HAProxy is a free, very fast and reliable solution offering
> +high availability, load balancing, and proxying for TCP and HTTP-based
> +applications.  It is particularly suited for web sites crawling under very
> +high loads while needing persistence or Layer7 processing.  Supporting tens of
> +thousands of connections is clearly realistic with todays hardware.")
                                                      ^today's
> [...]

Thanks again for packaging this!
- Jelle
diff mbox series

Patch

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ed339524c0..dd0c7010c5 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -36,6 +36,7 @@ 
 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,6 +65,7 @@ 
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages adns)
@@ -2853,3 +2855,46 @@  cables.")
                    (license:non-copyleft ; slirpvde
                     "file://COPYING.slirpvde"
                     "See COPYING.slirpvde in the distribution.")))))
+
+(define-public haproxy
+  (package
+    (name "haproxy")
+    (version "2.1.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.haproxy.org/download/"
+                                  (version-major+minor version)
+                                  "/src/haproxy-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0n8bw3d6gikr8c56ycrvksp1sl0b4yfzp19867cxkl3l0daqwrxv"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (let* ((out (assoc-ref %outputs "out")))
+         (list (string-append "PREFIX=" out)
+               (string-append "DOCDIR=" out "/share/" ,name)
+               "TARGET=linux-glibc"
+               "USE_LUA=1"
+               "USE_OPENSSL=1"
+               "USE_ZLIB=1"
+               "USE_PCRE_2=1"))
+       #:tests? #f  ; there is only regression tests, using varnishtest
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (inputs
+     `(("lua" ,lua)
+       ("openssl" ,openssl)
+       ("pcre2" ,pcre2)
+       ("zlib" ,zlib)))
+    (home-page "https://www.haproxy.org/")
+    (synopsis "Reliable, high performance TCP/HTTP load balancer")
+    (description "HAProxy is a free, very fast and reliable solution offering
+high availability, load balancing, and proxying for TCP and HTTP-based
+applications.  It is particularly suited for web sites crawling under very
+high loads while needing persistence or Layer7 processing.  Supporting tens of
+thousands of connections is clearly realistic with todays hardware.")
+    (license (list license:gpl2+
+                   license:lgpl2.1
+                   license:lgpl2.1+))))