unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#51022] [PATCH] Update direnv to 2.28.0
@ 2021-10-05  2:23 Artem Chernyak
  2021-10-13  9:47 ` Ludovic Courtès
  2021-10-14 23:39 ` [bug#51022] [PATCH] gnu: " Artem Chernyak
  0 siblings, 2 replies; 4+ messages in thread
From: Artem Chernyak @ 2021-10-05  2:23 UTC (permalink / raw)
  To: 51022

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

This patch includes an update to direnv. As part of the updated a few
extra changes were necessary to support the new version:

- Addition of go-golang-org-x-mod as a new dependency.
- Removal of the delete-vendor step since direnv no longer depends on
vendor files.
- Removal of the test run. The new tests depend on
https://github.com/golangci/golangci-lint which requires a lot of othe
dependencies. Since it's only needed for tests, maybe we can handle it
in a separate patch or once golangci-lint becomes needed in other
places.

[-- Attachment #2: 0001-Update-direnv-to-2.28.0.patch --]
[-- Type: text/x-patch, Size: 4116 bytes --]

From ced4b50ad1dda92e7ba58bebbe702b9dd7a3dae9 Mon Sep 17 00:00:00 2001
From: hackeryarn <artemchernyak@gmail.com>
Date: Mon, 4 Oct 2021 21:08:46 -0500
Subject: [PATCH] Update direnv to 2.28.0

---
 gnu/packages/golang.scm     | 37 +++++++++++++++++++++++++++++++++++++
 gnu/packages/shellutils.scm | 13 +++++--------
 2 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a96f743f68..3e4e691631 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2669,6 +2669,43 @@ time.")
       (home-page "https://godoc.org/golang.org/x/xerrors")
       (license license:bsd-3))))
 
+(define-public go-golang-org-x-mod
+  (let ((commit "0f08993efd8a8ec67e75bcccf86b0e1569b0ab0a")
+        (revision "0"))
+    (package
+      (name "go-golang-org-x-mod")
+      (version (git-version "0.5.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://go.googlesource.com/x/mod")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pl0jc5jvg7hxj4z66zg6kglnq5g7li09f3k9klwvyr4jx5dw88k"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "golang.org/x/mod/"
+         #:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           ;; Source-only package
+           (delete 'build))))
+      (home-page "https://golang.org/x/mod")
+      (synopsis "Tools to work directly with Go module mechanics")
+      (description
+       "This repository holds packages for writing tools that work directly
+with Go module mechanics. That is, it is for direct manipulation of Go modules
+themselves.
+It is NOT about supporting general development tools that need to do things
+like load packages in module mode. That use case, where modules are incidental
+rather than the focus, should remain in x/tools, specifically
+x/tools/go/packages.
+The specific case of loading packages should still be done by invoking the go
+command, which remains the single point of truth for package loading algorithms.")
+      (license license:bsd-3))))
+
 (define-public go-github-com-burntsushi-toml
   (package
     (name "go-github-com-burntsushi-toml")
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 94b5536df7..a8f0956913 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -239,7 +239,7 @@ are already there.")
 (define-public direnv
   (package
     (name "direnv")
-    (version "2.15.2")
+    (version "2.28.0")
     (source
      (origin (method git-fetch)
              (uri (git-reference
@@ -248,18 +248,13 @@ are already there.")
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "1y18619pmhfl0vrf4w0h75ybkkwgi9wcb7d9kv4n8drg1xp4aw4w"))))
+               "0yk53jn7wafklixclka17wyjjs2g5giigjr2bd0xzy10nrzwp7c9"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/direnv/direnv"
+       #:tests? #f ;; TODO fix tests
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'delete-vendor
-           (lambda _
-             ;; Using a snippet causes issues with the name of the directory,
-             ;; so delete the extra source code here.
-             (delete-file-recursively "src/github.com/direnv/direnv/vendor")
-             #t))
          (add-after 'install 'install-manpages
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -285,6 +280,8 @@ are already there.")
     (native-inputs
      `(("go-github-com-burntsushi-toml" ,go-github-com-burntsushi-toml)
        ("go-github-com-direnv-go-dotenv" ,go-github-com-direnv-go-dotenv)
+       ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
+       ("go-golang-org-x-mod" ,go-golang-org-x-mod)
        ("which" ,which)))
     (home-page "https://direnv.net/")
     (synopsis "Environment switcher for the shell")
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-18  8:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05  2:23 [bug#51022] [PATCH] Update direnv to 2.28.0 Artem Chernyak
2021-10-13  9:47 ` Ludovic Courtès
2021-10-14 23:39 ` [bug#51022] [PATCH] gnu: " Artem Chernyak
2021-10-18  8:36   ` bug#51022: [PATCH] " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).