~ruther/guix-local

0408934fc4d45e027ec723797e9ff6fccd15956d — Artyom V. Poptsov 2 years ago 2e275f7
gnu: Add go-github-com-koron-go-ssdp.

* gnu/packages/golang-web.scm (go-github-com-koron-go-ssdp): New variable.

Change-Id: I870d5152d052af6976af44ce6c86d49f0f030e32
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 48 insertions(+), 0 deletions(-)

M gnu/packages/golang-web.scm
M gnu/packages/golang-web.scm => gnu/packages/golang-web.scm +48 -0
@@ 2076,6 2076,54 @@ jsoniter and variable type declarations (if any).  jsoniter interfaces gives
router.")
    (license license:bsd-3)))

(define-public go-github-com-koron-go-ssdp
  (package
    (name "go-github-com-koron-go-ssdp")
    (version "0.0.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/koron/go-ssdp")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0agzxzlwvnhgwk6sxswjq7v1ghmf0l02gr7zpdih24i3g457af4f"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "github.com/koron/go-ssdp"
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'disable-failing-tests
            (lambda* (#:key tests? import-path #:allow-other-keys)
              (with-directory-excursion (string-append "src/" import-path)
                (substitute* (find-files "." "\\_test.go$")
                  ;; Test requiring network setup.
                  (("TestAdvertise_Alive") "OffTestAdvertise_Alive")
                  (("TestAdvertise_Bye") "OffTestAdvertise_Bye")
                  (("TestAnnounceAlive") "OffTestAnnounceAlive")
                  (("TestAnnounceBye") "OffTestAnnounceBye")
                  (("TestInterfaces") "OffTestInterfaces")
                  (("TestSearch_Request") "OffTestSearch_Request")
                  (("TestSearch_Response") "OffTestSearch_Response")
                  (("TestSearch_ServiceRawHeader") "OffTestSearch_ServiceRawHeader")))))
          ;; XXX: Run all tests, workaround for go-build-system's lack of Go
          ;; modules support.
          (replace 'check
            (lambda* (#:key tests? import-path #:allow-other-keys)
              (when tests?
                (with-directory-excursion (string-append "src/" import-path)
                  (invoke "go" "test" "-v" "./..."))))))))
    (propagated-inputs
     (list go-golang-org-x-net))
    (home-page "https://github.com/koron/go-ssdp")
    (synopsis "SSDP library for Golang")
    (description
     "@code{go-ssdp} is a @url{https://tools.ietf.org/html/draft-cai-ssdp-v1-03,
@acronym{Simple Service Discovery Protocol, SSDP}} library for Golang.")
    (license license:expat)))

(define-public go-github-com-makeworld-the-better-one-go-gemini
  (package
    (name "go-github-com-makeworld-the-better-one-go-gemini")