guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Go path issue


From: Christopher Howard
Subject: Go path issue
Date: Wed, 7 Dec 2022 14:09:53 -0900

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 via email to

[Prev in Thread] Current Thread [Next in Thread]