unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Howard <christopher@librehacker.com>
To: Guix-devel <guix-devel@gnu.org>
Subject: Go path issue
Date: Wed, 7 Dec 2022 14:09:53 -0900	[thread overview]
Message-ID: <Y5EdQYr/neYpHZ18@theoden> (raw)

Hello, I was trying to package some go software, using a definition based on what I got from the importer. This is my working definition:

```
(define-public go-git-sr-ht-adnano-go-gemini
  (package
    (name "go-git-sr-ht-adnano-go-gemini")
    (version "0.2.3")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://git.sr.ht/~adnano/go-gemini")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0mv4x4cfwyhh77wfb3r221bhr84x4nmjpgysnvvjgmbnnafsgfns"))))
    (build-system go-build-system)
    (arguments
     '(#:import-path "git.sr.ht/~adnano/go-gemini"))
    (propagated-inputs `(("go-golang-org-x-net" ,go-golang-org-x-net)))
    (home-page "https://git.sr.ht/~adnano/go-gemini")
    (synopsis "go-gemini")
    (description
     "Package gemini provides Gemini client and server implementations.")
    (license license:expat)))
```

This almost works, but the build fails because of a path issue:

```
starting phase `build'
src/golang.org/x/net/idna/idna10.0.0.go:25:2: cannot find package "golang.org/x/text/secure/bidirule" in any of:
	/gnu/store/d06665qgp3zqp05fr0q1sdbfnpvxywsc-go-1.17.11/lib/go/src/golang.org/x/text/secure/bidirule (from $GOROOT)
	/tmp/guix-build-go-git-sr-ht-adnano-go-gemini-0.2.3.drv-0/src/golang.org/x/text/secure/bidirule (from $GOPATH)
src/golang.org/x/net/idna/idna10.0.0.go:26:2: cannot find package "golang.org/x/text/unicode/bidi" in any of:
	/gnu/store/d06665qgp3zqp05fr0q1sdbfnpvxywsc-go-1.17.11/lib/go/src/golang.org/x/text/unicode/bidi (from $GOROOT)
	/tmp/guix-build-go-git-sr-ht-adnano-go-gemini-0.2.3.drv-0/src/golang.org/x/text/unicode/bidi (from $GOPATH)
src/golang.org/x/net/idna/idna10.0.0.go:27:2: cannot find package "golang.org/x/text/unicode/norm" in any of:
	/gnu/store/d06665qgp3zqp05fr0q1sdbfnpvxywsc-go-1.17.11/lib/go/src/golang.org/x/text/unicode/norm (from $GOROOT)
	/tmp/guix-build-go-git-sr-ht-adnano-go-gemini-0.2.3.drv-0/src/golang.org/x/text/unicode/norm (from $GOPATH)
Building 'git.sr.ht/~adnano/go-gemini' failed.
```

I looked and saw that the the files are available, but from the directory

/gnu/store/...-go-1.17.11/lib/go/src/vendor/golang.org/x/text/...

So, build system is looking for them at lib/go/src/golang.org but they are installed at lib/gosrc/***VENDOR***/golang.org.

I don't know much about Go or about how the paths are handled by our Go build system, so I was hoping somebody here could help me resolve this issue. I'm not a Go programmer but I was hoping to package another piece of software that depends on this one.

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ


             reply	other threads:[~2022-12-08 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 23:09 Christopher Howard [this message]
2022-12-08 16:26 ` Go path issue (

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=Y5EdQYr/neYpHZ18@theoden \
    --to=christopher@librehacker.com \
    --cc=guix-devel@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).