On 2023-06-24, Alan & Kim Zimmerman wrote:
> I took a look at this, and the problem seems to be that the cwd ends up
> different from before, so all the file operations fail.
>
> It needs (chdir "../nncp-7.5.0") in the 'go-unpack section.
>
> Attached is a patch that does this, if it works via gmail.

Thanks for the patch! Miraculously, it still applies after all this
time, and it does allow the build to proceed further, but still fails in
tests:

  starting phase `check'
  do  test
  # _/tmp/guix-build-nncp-7.5.0.drv-0/nncp-7.5.0/src/cmd/nncp-cfgdir
  cmd/nncp-cfgdir/main.go:91:4: unknown field 'AllowMinusZero' in struct 
literal of type hjson.EncoderOptions
  ok      _/tmp/guix-build-nncp-7.5.0.drv-0/nncp-7.5.0/src        37.407s       
                                                      ?       
_/tmp/guix-build-nncp-7.5.0.drv-0/nncp-7.5.0/src/cmd/nncp-bundle        [no 
test files]
  ?       _/tmp/guix-build-nncp-7.5.0.drv-0/nncp-7.5.0/src/cmd/nncp-call  [no 
test files]
  ?       _/tmp/guix-build-nncp-7.5.0.drv-0/nncp-7.5.0/src/cmd/nncp-caller      
  [no test files]
  do: test: got exit code 2
  error: in phase 'check': uncaught exception:
  %exception #<&invoke-error program: "contrib/do" arguments: ("-c" "test") 
exit-status: 1 term-signal: #f stop-signal: #f>
  phase `check' failed after 44.5 seconds
  command "contrib/do" "-c" "test" failed with status 1

CCed the members of the go team who may have a better idea of, well,
packaging go programs. :)

live well,
  vagrant

> From f2cc08e9cd657717049936938077a210773ab193 Mon Sep 17 00:00:00 2001
> Message-Id: 
> <f2cc08e9cd657717049936938077a210773ab193.1687601540.git.alan.z...@gmail.com>
> From: Alan Zimmerman <alan.z...@gmail.com>
> Date: Fri, 23 Jun 2023 23:57:48 +0100
> Subject: [PATCH] nncp: set directory so build succeeds
>
> ---
>  gnu/packages/uucp.scm | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/uucp.scm b/gnu/packages/uucp.scm
> index e10de59aa2..65e71c1b1a 100644
> --- a/gnu/packages/uucp.scm
> +++ b/gnu/packages/uucp.scm
> @@ -98,6 +98,7 @@ (define-public nncp
>             (assoc-ref go:%standard-phases 'setup-go-environment))
>           (add-after 'unpack 'go-unpack
>             (lambda* (#:key source #:allow-other-keys)
> +             (chdir "../nncp-7.5.0")
>               ;; Copy source to GOPATH.
>               (copy-recursively "src" "../src/go.cypherpunks.ru/nncp/v7")
>               ;; Move bundled dependencies to GOPATH.
>
> base-commit: f25529b08e356f89ca7cecc44295085531a8faba
> -- 
> 2.40.1

Attachment: signature.asc
Description: PGP signature

Reply via email to