all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Go path issue
@ 2022-12-07 23:09 Christopher Howard
  2022-12-08 16:26 ` (
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Howard @ 2022-12-07 23:09 UTC (permalink / raw)
  To: Guix-devel

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

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


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

* Re: Go path issue
  2022-12-07 23:09 Go path issue Christopher Howard
@ 2022-12-08 16:26 ` (
  0 siblings, 0 replies; 2+ messages in thread
From: ( @ 2022-12-08 16:26 UTC (permalink / raw)
  To: Christopher Howard, Guix-devel

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

Heya,

On Wed Dec 7, 2022 at 11:09 PM GMT, Christopher Howard wrote:
> 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.
> ```

Try adding ``go-golang-org-x-text'' to propagated-inputs.

    -- (

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2022-12-08 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-07 23:09 Go path issue Christopher Howard
2022-12-08 16:26 ` (

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.