unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: 49915@debbugs.gnu.org
Subject: [bug#49915] [PATCH 2/3] gnu: go-github-com-mattn-go-shellwords: Fix sh path.
Date: Fri,  6 Aug 2021 11:57:36 -0700	[thread overview]
Message-ID: <291625dd0fc68e516af6d6707fe37ab6f8c86b6c.1628275842.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <38f52b13a45c8e0792433861748499f1f5638cf7.1628275842.git.iskarian@mgsn.dev>

* gnu/packages/golang.scm (go-github-com-mattn-go-shellwords)[arguments]
<#:phases>{patch-sh-path}: New phase.
[inputs]: Add bash.
---
 gnu/packages/golang.scm | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c32324f235..b46f9e9bbf 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -58,6 +58,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module ((gnu packages bootstrap) #:select (glibc-dynamic-linker))
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
@@ -5273,24 +5274,14 @@ systems.")
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/mattn/go-shellwords"
-       ;; TODO: can't make homeless-shelter:
-       ;; go: disabling cache (/homeless-shelter/.cache/go-build) due to
-       ;; initialization failure: mkdir /homeless-shelter: permission denied
-
-       ;; This doesn't seem to work:
-
-       ;; #:phases
-       ;; (modify-phases %standard-phases
-       ;;   (replace 'check
-       ;;     (lambda* (#:key import-path #:allow-other-keys)
-       ;;       (setenv "HOME" "/tmp")
-       ;;       (invoke "go" "test" import-path))))
-
-       ;; TODO: There are also a couple of tests that have stymied Debian in
-       ;; the past.  They seem to work when run locally.
-
        #:tests? #f
-       ))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-sh-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/github.com/mattn/go-shellwords/util_posix.go"
+               (("/bin/sh") (which "sh"))))))))
+    (inputs `(("bash" ,bash)))
     (home-page "https://github.com/mattn/go-shellwords")
     (synopsis "Parse lines into shell words")
     (description "This package parses text into shell arguments.  Based on
-- 
2.31.1





  reply	other threads:[~2021-08-06 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 18:55 [bug#49915] [PATCH 1/3] gnu: go-github-com-mattn-go-shellwords: Update to 1.0.12 Sarah Morgensen
2021-08-06 18:57 ` Sarah Morgensen [this message]
2021-08-06 18:57 ` [bug#49915] [PATCH 3/3] gnu: go-github-com-mattn-go-shellwords: Enable tests Sarah Morgensen
2024-02-15 21:30 ` bug#49915: [PATCH 1/3] gnu: go-github-com-mattn-go-shellwords: Update to 1.0.12 Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=291625dd0fc68e516af6d6707fe37ab6f8c86b6c.1628275842.git.iskarian@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=49915@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).