~ruther/guix-local

dc10ed47df9c375d82f6fed8291d37a37fc29f0d — Sharlatan Hellseher 7 months ago 9e88bdd
gnu: Add go-gopkg-in-evanphx-json-patch-v4.

* gnu/packages/golang-web.scm (go-gopkg-in-evanphx-json-patch-v4): New variable.

Change-Id: I7bc78c6206daf55b9d4a928cf1782e8bc117c374
1 files changed, 24 insertions(+), 0 deletions(-)

M gnu/packages/golang-web.scm
M gnu/packages/golang-web.scm => gnu/packages/golang-web.scm +24 -0
@@ 12951,6 12951,30 @@ the standard @code{context} package to store request-scoped values.")
     "Package grpc implements an RPC system called @code{gRPC}.")
    (license license:asl2.0)))

;; This to satisfy alternative import path, some of the projects still use it
;; in go.mod.
(define-public go-gopkg-in-evanphx-json-patch-v4
  (package/inherit go-github-com-evanphx-json-patch
    (name "go-gopkg-in-evanphx-json-patch-v4")
    (arguments
     (substitute-keyword-arguments
         (package-arguments go-github-com-evanphx-json-patch)
       ((#:import-path "github.com/evanphx/json-patch")
        "gopkg.in/evanphx/json-patch.v4")
       ((#:unpack-path "github.com/evanphx/json-patch")
        "gopkg.in/evanphx/json-patch.v4")
       ((#:phases _ '%standard-phases)
        #~(modify-phases %standard-phases
            (add-after 'unpack 'remove-v5-module
              (lambda* (#:key import-path #:allow-other-keys)
                (delete-file-recursively
                 (string-append "src/" import-path "/v5"))))
            (add-before 'build 'adjust-import-path
              (lambda* (#:key import-path #:allow-other-keys)
                (with-directory-excursion (string-append "src/" import-path)
                  (substitute* (find-files "." "\\.go$")
                    (("github.com/evanphx/json-patch") import-path)))))))))))

(define-public go-gopkg-in-go-jose-go-jose-v2
  (package
    (inherit go-github-com-go-jose-go-jose-v3)