aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/traefik.scm
blob: d77ec931daa210b58da5eaf529c1f6e2665cfaa9 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(define-module (gn packages traefik)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system trivial)
  #:use-module (gnu packages base)
  #:use-module (gnu packages compression))

(define-public traefik
  (package
    (name "traefik")
    (version "2.0.4")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/containous/traefik/"
                                  "releases/download/v" version
                                  "/traefik_v" version "_linux_amd64.tar.gz"))
              (sha256
               (base32
                "0i0c2d647ks7x3p8l46rslrmnasdk88a6caq1c6diy3ngdcwik23"))))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let* ((out     (assoc-ref %outputs "out"))
                (bin     (string-append out "/bin"))
                (target  (string-append bin "/traefik"))
                (gzip    (assoc-ref %build-inputs "gzip"))
                (tar     (assoc-ref %build-inputs "tar"))
                (source  (assoc-ref %build-inputs "source")))
           (setenv "PATH" (string-append gzip "/bin"))
           (invoke (string-append tar "/bin/tar") "xvf" source)
           (install-file "traefik" bin)
           (install-file "LICENSE.md" (string-append out "/share/doc/"
                                                     ,name "-" ,version)))
         #t)))
    (native-inputs
     `(("gzip" ,gzip)
       ("source" ,source)
       ("tar"  ,tar)))
    (home-page "https://traefik.io/")
    (synopsis "Cloud Native Edge Router")
    (description "Traefik (pronounced traffic) is a modern HTTP reverse proxy
and load balancer that makes deploying microservices easy.  Traefik integrates
with your existing infrastructure components (Docker, Swarm mode, Kubernetes,
Marathon, Consul, Etcd, Rancher, Amazon ECS, ...) and configures itself
automatically and dynamically.  Pointing Traefik at your orchestrator should be
the only configuration step you need.")
    (supported-systems '("x86_64-linux"))
    (license license:expat)))