go-build-system and Syncthing

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • Ludovic Courtès
  • ng0
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 24 Sep 2017 22:36
(address . guix-patches@gnu.org)
20170924203651.GA29973@jasmine.lan
These patches add a go-build-system, a package for Syncthing, and
Syncthing's dependencies.

The patch for Syncthing and its dependencies is squashed to make review
more convenient (there are dozens of packages). I can split this up into
individual commits before pushing.

There are a handful of XXX comments in (guix build go-build-system).
Advice welcome :)

Also, this build system does not attempt cross-compilation, earning
another XXX in (guix build-system go).

I've skipped a few package test suites in (gnu packages syncthing).
However, everything works for me, and Syncthing passes its test suite,
at least.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlnIF2AACgkQJkb6MLrK
fwjfog//awG5efkYjNdcFKNall4o5BlCVbXAU8OzBlMgV28WSnvzjcZrFaNt+Tzz
sABLPtbU9U5dVKGJTtTdhhUNiChnFhXCmHUliZkwVgsFw1GQ4NRAdi1ZRXXLW79c
0jGraCXTMlu+bGvnwQ4sB3k9WtULbZiYakCFL9rA35Oi5ZyMuePuS5MGBMtsNTeJ
ZMAczBjweWR/HCqluI3AirVZJfKFUOVks4k1gP9zRO7iamhU3+1x+zJAVeQrBbx7
oKwaWf3xexaaDazFxnYDWbi9W9bjz4lTh/n+Dndel3pWu55nV8HTD/UXdpbo/f3+
VjDfFzXiWw8GO+mIFYOXZiTxEz4yDZLTyG+gJgAzFXac8ZrXv9F3dkIycqK/LiZj
adhCJ5E0NrF7TKom/FdHAT5nEcoOTVv9Jj8VFRfxbirq/3bMnwmbYG2XN5hmp9dS
jDbwCKLilEcvRtQrBr62Fsb3c5mHFISUzwEnI+oXZN+7YKeRh0H9FIgwHCd+qBg4
dlovYmbEWk0f6S9AgoIL2ECLBmS9M0qiOoqrpiE26lhv0gyszolNK3NfY4EjTgyA
THCOCjzaBbJERl/mOD1sGrz/Gl4JWHFcM4cFo/ZRwHM4ha0T22q6mhkOiV1J3fDh
rZ7MCxzlWglZwqN/DwWURzFqEOmZhfI35uO5wLsVyHRZmae40vU=
=8y8r
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 24 Sep 2017 22:40
[PATCH 1/2] build: Add the Go build system.
(address . 28586@debbugs.gnu.org)
fd4f5962c0ba60f54823815b1fa8f0c22bd315a8.1506285652.git.leo@famulari.name
* guix/build-system/go.scm,
guix/build/go-build-system.scm: New files.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document the go-build-system.
---
Makefile.am | 2 +
doc/guix.texi | 18 ++++
guix/build-system/go.scm | 132 ++++++++++++++++++++++++++
guix/build/go-build-system.scm | 207 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 359 insertions(+)
create mode 100644 guix/build-system/go.scm
create mode 100644 guix/build/go-build-system.scm

Toggle diff (402 lines)
diff --git a/Makefile.am b/Makefile.am
index e35bdac30..1da8e3fb5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -79,6 +79,7 @@ MODULES = \
guix/build-system/dub.scm \
guix/build-system/emacs.scm \
guix/build-system/font.scm \
+ guix/build-system/go.scm \
guix/build-system/meson.scm \
guix/build-system/minify.scm \
guix/build-system/asdf.scm \
@@ -110,6 +111,7 @@ MODULES = \
guix/build/meson-build-system.scm \
guix/build/minify-build-system.scm \
guix/build/font-build-system.scm \
+ guix/build/go-build-system.scm \
guix/build/asdf-build-system.scm \
guix/build/git.scm \
guix/build/hg.scm \
diff --git a/doc/guix.texi b/doc/guix.texi
index 0462a6419..894cd329b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3566,6 +3566,24 @@ debugging information''), which roughly means that code is compiled with
@code{-O2 -g}, as is the case for Autoconf-based packages by default.
@end defvr
+@defvr {Scheme Variable} go-build-system
+This variable is exported by @code{(guix build-system go)}. It
+implements a build procedure for Go packages using the standard
+@url{https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies,
+Go build mechanisms}.
+
+The user is expected to provide a value for the key @code{#:import-path}
+and, in some cases, @code{#:unpack-path}. The
+@url{https://golang.org/doc/code.html#ImportPaths, import path}
+corresponds to the filesystem path expected by the package's build
+scripts and any referring packages, and provides a unique way to
+refer to a Go package. It is typically based on a combination of the
+package source code's remote URI and filesystem hierarchy structure. In
+some cases, you will need to unpack the package's source code to a
+different directory structure than the one indicated by the import path,
+and @code{#:unpack-path} should be used in such cases.
+@end defvr
+
@defvr {Scheme Variable} glib-or-gtk-build-system
This variable is exported by @code{(guix build-system glib-or-gtk)}. It
is intended for use with packages making use of GLib or GTK+.
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
new file mode 100644
index 000000000..43599df6f
--- /dev/null
+++ b/guix/build-system/go.scm
@@ -0,0 +1,132 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Petter <petter@mykolab.ch>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system go)
+ #:use-module (guix utils)
+ #:use-module (guix derivations)
+ #:use-module (guix search-paths)
+ #:use-module (guix build-system)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix packages)
+ #:use-module (ice-9 match)
+ #:export (%go-build-system-modules
+ go-build
+ go-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for packages using the Go build system. It is
+;; implemented as an extension of 'gnu-build-system'.
+;;
+;; Code:
+
+(define %go-build-system-modules
+ ;; Build-side modules imported and used by default.
+ `((guix build go-build-system)
+ ,@%gnu-build-system-modules))
+
+(define (default-go)
+ ;; Lazily resolve the binding to avoid a circular dependency.
+ (let ((go (resolve-interface '(gnu packages golang))))
+ (module-ref go 'go)))
+
+(define* (lower name
+ #:key source inputs native-inputs outputs system target
+ (go (default-go))
+ #:allow-other-keys
+ #:rest arguments)
+ "Return a bag for NAME."
+ (define private-keywords
+ '(#:source #:target #:go #:inputs #:native-inputs))
+
+ (and (not target) ;XXX: no cross-compilation
+ (bag
+ (name name)
+ (system system)
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@inputs
+
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(standard-packages)))
+ (build-inputs `(("go" ,go)
+ ,@native-inputs))
+ (outputs outputs)
+ (build go-build)
+ (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (go-build store name inputs
+ #:key
+ (phases '(@ (guix build go-build-system)
+ %standard-phases))
+ (outputs '("out"))
+ (search-paths '())
+ (import-path "")
+ (unpack-path "")
+ (tests? #t)
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %go-build-system-modules)
+ (modules '((guix build go-build-system)
+ (guix build utils))))
+ (define builder
+ `(begin
+ (use-modules ,@modules)
+ (go-build #:name ,name
+ #:source ,(match (assoc-ref inputs "source")
+ (((? derivation? source))
+ (derivation->output-path source))
+ ((source)
+ source)
+ (source
+ source))
+ #:system ,system
+ #:phases ,phases
+ #:outputs %outputs
+ #:search-paths ',(map search-path-specification->sexp
+ search-paths)
+ #:import-path ,import-path
+ #:unpack-path ,unpack-path
+ #:tests? ,tests?
+ #:inputs %build-inputs)))
+
+ (define guile-for-build
+ (match guile
+ ((? package?)
+ (package-derivation store guile system #:graft? #f))
+ (#f ; the default
+ (let* ((distro (resolve-interface '(gnu packages commencement)))
+ (guile (module-ref distro 'guile-final)))
+ (package-derivation store guile system
+ #:graft? #f)))))
+
+ (build-expression->derivation store name builder
+ #:inputs inputs
+ #:system system
+ #:modules imported-modules
+ #:outputs outputs
+ #:guile-for-build guile-for-build))
+
+(define go-build-system
+ (build-system
+ (name 'go)
+ (description
+ "Build system for Go programs")
+ (lower lower)))
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
new file mode 100644
index 000000000..c2a488023
--- /dev/null
+++ b/guix/build/go-build-system.scm
@@ -0,0 +1,207 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Petter <petter@mykolab.ch>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build go-build-system)
+ #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
+ #:export (%standard-phases
+ go-build))
+
+;; Commentary:
+;;
+;; Build procedures for Go packages. This is the builder-side code.
+;;
+;; Software written in Go is either a 'package' (i.e. library) or 'command'
+;; (i.e. executable). Both types can be built with either the `go build` or `go
+;; install` commands. However, `go build` discards the result of the build
+;; process for Go libraries, so we use `go install`, which preserves the
+;; results. [0]
+
+;; Go software is developed and built within a particular filesystem hierarchy
+;; structure called a 'workspace' [1]. This workspace is found by Go
+;; via the GOPATH environment variable. Typically, all Go source code
+;; and compiled objects are kept in a single workspace, but it is
+;; possible for GOPATH to contain a list of directories, and that is
+;; what we do in this go-build-system. [2]
+;;
+;; Go software, whether a package or a command, is uniquely named using
+;; an 'import path'. The import path is based on the URL of the
+;; software's source. Since most source code is provided over the
+;; internet, the import path is typically a combination of the remote
+;; URL and the source repository's filesystem structure. For example,
+;; the Go port of the common `du` command is hosted on github.com, at
+;; <https://github.com/calmh/du>. Thus, the import path is
+;; <github.com/calmh/du>. [3]
+;;
+;; It may be possible to programatically guess a package's import path
+;; based on the source URL, but we don't try that in this revision of
+;; the go-build-system.
+;;
+;; Modules of modular Go libraries are named uniquely with their
+;; filesystem paths. For example, the supplemental but "standardized"
+;; libraries developed by the Go upstream developers are available at
+;; <https://golang.org/x/{net,text,crypto, et cetera}>. The Go IPv4
+;; library's import path is <golang.org/x/net/ipv4>. The source of
+;; such modular libraries must be unpacked at the top-level of the
+;; filesystem structure of the library. So the IPv4 library should be
+;; unpacked to <golang.org/x/net>. This is handled in the
+;; go-build-system with the optional #:unpack-path key.
+;;
+;; In general, Go software is built using a standardized build mechanism
+;; that does not require any build scripts like Makefiles. This means
+;; that all modules of modular libraries cannot be built with a single
+;; command. Each module must be built individually. This complicates
+;; certain cases, and these issues are currently resolved by creating a
+;; filesystem union of the required modules of such libraries. I think
+;; this could be improved in future revisions of the go-build-system.
+;;
+;; [0] `go build`:
+;; https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies
+;; `go install`:
+;; https://golang.org/cmd/go/#hdr-Compile_and_install_packages_and_dependencies
+;; [1] https://golang.org/doc/code.html#Workspaces
+;; bin/
+;; hello # command executable
+;; outyet # command executable
+;; pkg/
+;; linux_amd64/
+;; github.com/golang/example/
+;; stringutil.a # package object
+;; src/
+;; github.com/golang/example/
+;; .git/ # Git repository metadata
+;; hello/
+;; hello.go # command source
+;; outyet/
+;; main.go # command source
+;; main_test.go # test source
+;; stringutil/
+;; reverse.go # package source
+;; reverse_test.go # test source
+;; golang.org/x/image/
+;; .git/ # Git repository metadata
+;; bmp/
+;; reader.go # package source
+;; writer.go # package source
+;; ... (many more repositories and packages omitted) ...
+;;
+;; [2] https://golang.org/doc/code.html#GOPATH
+;; [3] https://golang.org/doc/code.html#ImportPaths
+;;
+;; Code:
+
+(define* (unpack #:key source import-path unpack-path #:allow-other-keys)
+ "Unpack SOURCE in the UNPACK-PATH, or the IMPORT-PATH is the UNPACK-PATH is
+unset. When SOURCE is a directory, copy it instead of unpacking."
+ (if (string-null? import-path)
+ ((display "WARNING: The Go import path is unset.\n")))
+ (if (string-null? unpack-path)
+ (set! unpack-path import-path))
+ (mkdir "src")
+ (let ((dest (string-append "src/" unpack-path)))
+ (mkdir-p dest)
+ (if (file-is-directory? source)
+ (begin
+ (copy-recursively source dest #:keep-mtime? #t)
+ #t)
+ (if (string-suffix? ".zip" source)
+ (zero? (system* "unzip" "-d" dest source))
+ (zero? (system* "tar" "-C" dest "-xvf" source))))))
+
+(define* (install-source #:key outputs #:allow-other-keys)
+ "Install the source code to the output directory."
+ (let* ((out (assoc-ref outputs "out"))
+ (source "src")
+ (dest (string-append out "/" source)))
+ (copy-recursively source dest #:keep-mtime? #t)
+ #t))
+
+(define (golang-package? name)
+ (string-prefix? "golang-" name))
+
+(define (golang-inputs inputs)
+ "Return the alist of INPUTS that are Go software."
+ ;; XXX This should not check the file name of the store item. Instead we
+ ;; should pass, from the host side, the list of inputs that are packages using
+ ;; the go-build-system.
+ (alist-delete "source"
+ (filter (match-lambda
+ ((label . directory)
+ (golang-package? ((compose package-name->name+version
+ strip-store-file-name)
+ directory)))
+ (_ #f))
+ inputs)))
+
+(define* (setup-environment #:key inputs outputs #:allow-other-keys)
+ "Export the variables GOPATH and GOBIN, which are based on INPUTS and OUTPUTS,
+respectively."
+ (let ((out (assoc-ref outputs "out")))
+ ;; GOPATH is where Go looks for the source code of the build's dependencies.
+ (set-path-environment-variable "GOPATH"
+ ;; XXX Matching "." hints that we could do
+ ;; something simpler here...
+ (list ".")
+ (match (golang-inputs inputs)
+ (((_ . dir) ...)
+ dir)))
+
+ ;; Add the source code of the package being built to GOPATH.
+ (if (getenv "GOPATH")
+ (setenv "GOPATH" (string-append (getcwd) ":" (getenv "GOPATH")))
+ (setenv "GOPATH" (getcwd)))
+ ;; Where to install compiled executable files ('commands' in Go parlance').
+ (setenv "GOBIN" out)
+ #t))
+
+(define* (build #:key import-path #:allow-other-keys)
+ "Build the package named by IMPORT-PATH."
+ (zero? (system* "go" "install" "-v" import-path)))
+
+(define* (check #:key tests? import-path #:allow-other-keys)
+ "Run the tests for the package named by IMPORT-PATH."
+ (if tests?
+ (zero? (system* "go" "test" import-path))))
+
+(define* (install #:key outputs #:allow-other-keys)
+ "Install the compiled libraries. `go install` installs these files to
+$GOPATH/pkg, so we have to copy them into the output direcotry manually.
+Compiled executable files should have already been installed to the store based
+on $GOBIN in the build phase."
+ (when (file-exists? "pkg")
+ (copy-recursively "pkg" (string-append (assoc-ref outputs "out") "/pkg")))
+ #t)
+
+(define %standard-phases
+ (modify-phases gnu:%standard-phases
+ (delete 'configure)
+ (delete 'patch-generated-file-shebangs)
+ (replace 'unpack unpack)
+ (add-after 'unpack 'install-source install-source)
+ (add-before 'build 'setup-environment setup-environment)
+ (replace 'build build)
+ (replace 'check check)
+ (replace 'install install)))
+
+(define* (go-build #:key inputs (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ "Build the given Go package, applying all of PHASES in order."
+ (apply gnu:gnu-build #:inputs inputs #:phases phases args))
--
2.14.1
L
L
Leo Famulari wrote on 24 Sep 2017 22:40
[PATCH 2/2] gnu: Add Syncthing.
(address . 28586@debbugs.gnu.org)
5f9b36da2183c37cb24713472ea22921c0f48d36.1506285652.git.leo@famulari.name
* gnu/packages/syncthing.scm: New file.

Co-authored-by: Petter <petter@mykolab.ch>
---
gnu/local.mk | 1 +
gnu/packages/syncthing.scm | 1853 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1854 insertions(+)
create mode 100644 gnu/packages/syncthing.scm

Toggle diff (438 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index acae77326..14aa0303f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -381,6 +381,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/suckless.scm \
%D%/packages/swig.scm \
%D%/packages/sync.scm \
+ %D%/packages/syncthing.scm \
%D%/packages/synergy.scm \
%D%/packages/syndication.scm \
%D%/packages/task-management.scm \
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
new file mode 100644
index 000000000..bd02e6e9f
--- /dev/null
+++ b/gnu/packages/syncthing.scm
@@ -0,0 +1,1853 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Petter <petter@mykolab.ch>
+;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages syncthing)
+ #:use-module (guix build-system go)
+ #:use-module (guix build-system trivial)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix licenses))
+
+(define-public syncthing
+ (package
+ (name "syncthing")
+ (version "0.14.37")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/syncthing/syncthing"
+ "/releases/download/v" version
+ "/syncthing-source-v" version ".tar.gz"))
+ (sha256
+ (base32
+ "02xs4x49va9cnapx6g19b62ln85wskxnr94nrz4mxdlsn7qgw92l"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/syncthing/syncthing"
+ #:unpack-path "github.com/syncthing"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'delete-bundled-source-code
+ (lambda _
+ ;; Keep the bundled cznic libraries. There are some "internal"
+ ;; cznic libraries that complicate the use of non-bundled copies.
+ (rename-file "src/github.com/syncthing/syncthing/vendor/github.com/cznic"
+ "cznic")
+ (delete-file-recursively "src/github.com/syncthing/syncthing/vendor")
+ (mkdir-p "src/github.com/syncthing/syncthing/vendor/github.com/")
+ (rename-file "cznic"
+ "src/github.com/syncthing/syncthing/vendor/github.com/cznic")
+ #t))
+
+ ;; We don't need to install the source code for end-user applications.
+ (delete 'install-source)
+
+ (add-before 'build 'increase-test-timeout
+ (lambda _
+ (substitute* "src/github.com/syncthing/syncthing/build.go"
+ (("60s") "999s"))
+ #t))
+
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "src/github.com/syncthing/syncthing"
+ (zero? (system* "go" "run" "build.go" "-no-upgrade")))))
+
+ (replace 'check
+ (lambda _
+ (with-directory-excursion "src/github.com/syncthing/syncthing"
+ (zero? (system* "go" "run" "build.go" "test")))))
+
+ (replace 'install
+ (lambda _
+ (copy-recursively "src/github.com/syncthing/syncthing/bin/"
+ (string-append (assoc-ref %outputs "out") "/bin"))
+ #t))
+
+ (add-after 'install 'install-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man (string-append out "/share/man/man"))
+ (src "src/github.com/syncthing/syncthing/man/"))
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append man (string-take-right file 1))))
+ (find-files src "\\.[1-9]"))
+ #t))))))
+ (inputs
+ `(("github-com-AudriusButkevicius-go-nat-pmp"
+ ,golang-github-com-audriusbutkevicius-go-nat-pmp)
+ ("golang-github-com-vitrun-qart" ,(golang-github-com-vitrun-qart))
+ ("github-com-thejerf-suture" ,golang-github-com-thejerf-suture)
+ ("github-com-syndtr-goleveldb" ,golang-github-com-syndtr-goleveldb)
+ ("github-com-sasha-s-go-deadlock" ,golang-github-com-sasha-s-go-deadlock)
+ ("github-com-rcrowley-go-metrics" ,golang-github-com-rcrowley-go-metrics)
+ ("github-com-minio-sha256-simd" ,golang-github-com-minio-sha256-simd)
+ ("github-com-kardianos-osext" ,golang-github-com-kardianos-osext)
+ ("golang-github-com-kballard-go-shellquote"
+ ,golang-github-com-kballard-go-shellquote)
+ ("github-com-jackpal-gateway" ,golang-github-com-jackpal-gateway)
+ ("github-com-gobwas-glob" ,golang-github-com-gobwas-glob)
+ ("github-com-calmh-xdr" ,golang-github-com-calmh-xdr)
+ ("github-com-calmh-luhn" ,golang-github-com-calmh-luhn)
+ ("github-com-calmh-du" ,golang-github-com-calmh-du)
+ ("github-com-bkaradzic-go-lz4" ,golang-github-com-bkaradzic-go-lz4)
+ ("github-com-golang-snappy" ,golang-github-com-golang-snappy)
+ ("golang-org-x-crypto" ,(golang-org-x-crypto))
+ ("golang-org-x-text" ,(golang-org-x-text))
+ ("golang.org-x-net" ,(golang-org-x-net))
+ ("golang-github-com-gogo-protobuf-protoc-gen-gogo"
+ ,golang-github-com-gogo-protobuf-protoc-gen-gogo)
+ ("golang-github-com-gogo-protobuf"
+ ,golang-github-com-gogo-protobuf)
+ ("golang-github-com-audriusbutkevicius-pfilter"
+ ,golang-github-com-audriusbutkevicius-pfilter)
+ ("github-com-ccding-go-stun"
+ ,golang-github-com-ccding-go-stun)
+ ("github-com-chmduquesne-rollinghash-adler32"
+ ,golang-github-com-chmduquesne-rollinghash-adler32)
+ ("golang-github-com-xtaci-kcp-go" ,golang-github-com-xtaci-kcp-go)
+ ("golang-github-com-klauspost-reedsolomon"
+ ,golang-github-com-klauspost-reedsolomon)
+ ("golang-github-com-xtaci-smux" ,golang-github-com-xtaci-smux)
+ ("golang-org-x-time-rate" ,golang-org-x-time-rate)
+ ("golang-github-com-oschwald-maxminddb-golang"
+ ,golang-github-com-oschwald-maxminddb-golang)
+ ("golang-org-x-sys-unix" ,golang-org-x-sys-unix)
+ ("golang-github-com-audriusbutkevicius-cli"
+ ,golang-github-com-audriusbutkevicius-cli)
+ ("golang-github-com-lib-pq" ,golang-github-com-lib-pq)
+ ("golang-github-com-oschwald-geoip2-golang"
+ ,golang-github-com-oschwald-geoip2-golang)
+ ("golang-github-com-golang-groupcache-lru"
+ ,golang-github-com-golang-groupcache-lru)
+; ("golang-github-com-cznic-ql" ,golang-github-com-cznic-ql) ; bundled
+ ("golang-github-com-edsrzf-mmap-go" ,golang-github-com-edsrzf-mmap-go)
+ ; Tests
+ ("golang-github-com-d4l3k-messagediff"
+ ,golang-github-com-d4l3k-messagediff)))
+ (synopsis "Decentralized continuous filesystem synchronization")
+ (description "Syncthing is a peer-to-peer file synchronization tool that
+supports a wide variety of computing platforms. It uses the Block Exchange
+Protocol.")
+ (home-page "https://github.com/syncthing/syncthing")
+ (license mpl2.0)))
+
+(define-public golang-github-com-audriusbutkevicius-go-nat-pmp
+ (let ((commit "452c97607362b2ab5a7839b8d1704f0396b640ca")
+ (revision "0"))
+ (package
+ (name "golang-github-com-audriusbutkevicius-go-nat-pmp")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AudriusButkevicius/go-nat-pmp")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32 "1accmpl1llk16a19nlyy991fqrgfay6l53gb64hgmdfmqljdvbk7"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/AudriusButkevicius/go-nat-pmp"))
+ (synopsis "Port mapping and discovery of the external IP address")
+ (description "Go client for the NAT-PMP internet protocol for port mapping and discovering the external IP address of a firewall")
+ (home-page "https://github.com/AudriusButkevicius/go-nat-pmp")
+ (license asl2.0))))
+
+(define-public golang-github-com-bkaradzic-go-lz4
+ (let ((commit "7224d8d8f27ef618c0a95f1ae69dbb0488abc33a")
+ (revision "0"))
+ (package
+ (name "golang-github-com-bkaradzic-go-lz4")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bkaradzic/go-lz4")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "10lmya17vdqg2pvqni0p73iahni48s1v11ya9a0hcz4jh5vw4dkb"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/bkaradzic/go-lz4"))
+ (synopsis "Port of LZ4 lossless compression algorithm")
+ (description "go-lz4 is port of LZ4 lossless compression algorithm to Go")
+ (home-page "https://github.com/bkaradzic/go-lz4")
+ (license bsd-2))))
+
+(define-public golang-github-com-calmh-du
+ (package
+ (name "golang-github-com-calmh-du")
+ (version "1.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/calmh/du")
+ (commit (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0qb3a6y3p9nkyn3s66k6zcm16y8n8578qh23ddj14cxf2scrr2n2"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/calmh/du"))
+ (synopsis "Get total and available disk space on a given volume")
+ (description "Du provides disk usage information, such as how much storage
+space is available, free, and used.")
+ (home-page "https://github.com/calmh/du")
+ (license public-domain)))
+
+(define-public golang-github-com-calmh-luhn
+ (package
+ (name "golang-github-com-calmh-luhn")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/calmh/luhn")
+ (commit (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32 "1hfj1lx7wdpifn16zqrl4xml6cj5gxbn6hfz1f46g2a6bdf0gcvs"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/calmh/luhn"))
+ (synopsis "Luhn-mod-N implementation in Go")
+ (description "This packages provides a Luhn-mod-N implementation in Go.")
+ (home-page "https://github.com/calmh/luhn")
+ (license expat)))
+
+(define-public golang-github-com-calmh-xdr
+ (let ((commit "08e072f9cb164f943a92eb59f90f3abc64ac6e8f")
+ (revision "0"))
+ (package
+ (name "golang-github-com-calmh-xdr")
+ (version (string-append "2.0.1-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/calmh/xdr")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "072wqdncz3nd4a3zkhvzzx1y3in1lm29wfvl0d8wrnqs5pyqh0mh"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/calmh/xdr"))
+ (synopsis "XDR marshalling and unmarshalling")
+ (description "XDR is an External Data Representation (XDR)
+marshalling and unmarshalling library in Go. It uses code generation and not
+reflection")
+ (home-page "https://github.com/calmh/xdr")
+ (license expat))))
+
+(define-public golang-github-com-d4l3k-messagediff
+ (let ((commit "29f32d820d112dbd66e58492a6ffb7cc3106312b")
+ (revision "0"))
+ (package
+ (name "golang-github-com-d4l3k-messagediff")
+ (version (string-append "1.1.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/d4l3k/messagediff")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "104hl8x57ciaz7mzafg1vp9qggxcyfm8hsv9bmlihbz9ml3nyr8v"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/d4l3k/messagediff"))
+ (synopsis "Diff arbitrary Golang structs")
+ (description "Messagediff is a library for calculating diffs of arbitrary
+Golang structs.")
+ (home-page "https://github.com/d4l3k/messagediff")
+ (license expat))))
+
+(define-public golang-github-com-edsrzf-mmap-go
+ (let ((commit "0bce6a6887123b67a60366d2c9fe2dfb74289d2e")
+ (revision "0"))
+ (package
+ (name "golang-github-com-edsrzf-mmap-go")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/edsrzf/mmap-go")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1am4m2k451bksnbiqj6lxknk4lsgmrhv0q3ajqac818vj0cpfgs9"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/edsrzf/mmap-go"))
+ (synopsis "Go implementation of mmap")
+ (description "This packages provides a Go implementation of mmap.")
+ (home-page "https://github.com/edsrzf/mmap-go")
+ (license bsd-3))))
+
+(define-public golang-github-com-gobwas-glob
+ (let ((commit "51eb1ee00b6d931c66d229ceeb7c31b985563420")
+ (revision "0"))
+ (package
+ (name "golang-github-com-gobwas-glob")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gobwas/glob")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "090wzpwsjana1qas8ipwh1pj959gvc4b7vwybzi01f3bmd79jwlp"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/gobwas/glob"))
+ (synopsis "Go globbing library")
+ (description "This packages provides a Go implementation of globs.")
+ (home-page "https://github.com/gobwas/glob")
+ (license expat))))
+
+(define-public golang-github-com-gogo-protobuf
+ (let ((commit "efccd33a0c20aa078705571d5ddbfa14c8395a63")
+ (revision "0"))
+ (package
+ (name "golang-github-com-gogo-protobuf")
+ (version (string-append "0.2-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gogo/protobuf")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "09kfa3aqmhh7p0rc6wd4fw5cjccidsk9vgcy13albv0g8vnbmmgw"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/gogo/protobuf/proto"
+ #:unpack-path "github.com/gogo/protobuf"))
+ (inputs
+ `(("golang-github-com-gogo-protobuf-protoc-gen-gogo"
+ ,golang-github-com-gogo-protobuf-protoc-gen-gogo)))
+ (synopsis "Protocol Buffers for Go with Gadgets")
+ (description "gogoprotobuf is a fork of golang/protobuf with extra code
+generation features. This code generation is used to achieve:
+
+ fast marshalling and unmarshalling
+ more canonical Go structures
+ goprotobuf compatibility
+ less typing by optionally generating extra helper code
+ peace of mind by optionally generating test and benchmark code
+ other serialization formats")
+ (home-page "https://github.com/gogo/protobuf")
+ (license bsd-3))))
+
+(define-public golang-github-com-gogo-protobuf-protoc-gen-gogo
+ (let ((commit "efccd33a0c20aa078705571d5ddbfa14c8395a63")
+ (revision "0"))
+ (package
+ (name "golang-github-com-gogo-protobuf-protoc-gen-gogo")
+ (version (string-append "0.2-" revision "0" (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gogo/protobuf")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "09kfa3aqmhh7p0rc6wd4fw5cjccidsk9vgcy13albv0g8vnbmmgw"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/gogo/protobuf/protoc-gen-gogo"
+ #:unpack-path "github.com/gogo/protobuf"))
+ (synopsis "Protocol Buffers for Go with Gadgets")
+ (description "Gogoprotobuf is a fork of golang/protobuf with extra code
+generation features. This code generation is used to achieve:
+
+ fast marshalling and unmarshalling
+ more canonical Go structures
+ goprotobuf compatibility
+ less typing by optionally generating extra helper code
+ peace of mind by optionally generating test and benchmark code
+ other serialization formats")
+ (home-page "https://github.com/gogo/protobuf")
+ (license bsd-3))))
+
+(define-public golang-github-com-golang-groupcache-lru
+ (let ((commit "72d04f9fcdec7d3821820cc4a6f150eae553639a")
+ (revision "0"))
+ (package
+ (name "golang-github-com-golang-groupcache-lru")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/golang/groupcache")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1l3ryh7bq1f2mhr3sd3x1wav99pd27r8l3ydgqh375wn4x7v5qd6"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/golang/groupcache/lru"
+ #:unpack-path "github.com/golang/groupcac
This message was truncated. Download the full message here.
L
L
Leo Famulari wrote on 25 Sep 2017 20:21
(address . 28586@debbugs.gnu.org)
20170925182144.GA16527@jasmine.lan
On Sun, Sep 24, 2017 at 04:40:53PM -0400, Leo Famulari wrote:
Toggle quote (4 lines)
> * gnu/packages/syncthing.scm: New file.
>
> Co-authored-by: Petter <petter@mykolab.ch>

[...]

Toggle quote (19 lines)
> +(define-public golang-github-com-sasha-s-go-deadlock
> + (package
> + (name "golang-github-com-sasha-s-go-deadlock")
> + (version "341000892f3dd25f440e6231e8533eb3688ed7ec")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/sasha-s/go-deadlock")
> + (commit version)))
> + (file-name (string-append name "-" version "-checkout"))
> + (sha256
> + (base32
> + "1bcdyxwm5qpqynxahwaahbqi7ghgdajmg7b4276pdalkxkxkhsv8"))))
> + (build-system go-build-system)
> + (arguments
> + `(#:import-path "github.com/sasha-s/go-deadlock"))
> + (propagated-inputs
> + `(("golang-github-com-petermattis-goid" ,golang-github-com-petermattis-goid)))

There are a handful of packages, like this one, that seem to need their
dependencies propagated, or else building Syncthing fails when the
package fails to find its dependency.

This suggests to me that the Syncthing build process is not using the
compiled objects of these packages but is instead trying to rebuild
them.

So, perhaps something is not quite right with the go-build-system — I'm
not sure.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlnJSTgACgkQJkb6MLrK
fwhvJRAAkjd0i11oGY0TVZBbckrrirIssIjIzo0PL6mZei+xxQ1wOaExv24wFcpv
6csb94BqBdqRlGDE7Lt99u6bH6NQdR5eqfxAJKtAGE/i5CdGGqwvA0fymq16QQ9k
2L72aVpuoevP0GBklPPM2xqBo7DIWxY0jrVNCzhtyKhOv5iYDJjbNTSOJ+pHmjTA
1FT9Q1Ca1lENEYxnNcCJLscolP9yS8NmJv5LCaqEnSyJ682lkDSt7MlSJKq/8JJG
CfAXAqlIfAvpflD3T12GD5mYdbKHGX6RjN1MgGzeqJbUpZgJjM27STkVol5k9ne4
7cbl4TtmTXTofJuLtNgRJZt5nCe+Uy/r1W55iCIX59i6cjZhGERcdb4iyIdkVvN8
J4nqCHOA76TkzQnA19IV6HWBS7tmba5ZCduUPYBnVHGnUcAUsegFcm5tokkcBJhF
i3t8EuhusUI3kGySH3Nh/tlDVIR+Nbs4gjnhxvAct7xY7v4vNgZBjwb/LW2ouAbJ
radWilZkoAF5xAyxYA5+7gNIGnnM49aCg4TXSLFVgYktaf+eoI04AdsqUZO3E0oD
4dY1XlITmJq0fDqm93hFYhXrwNR0bH7ACwqYdky0NrJJrPG415qdR4fpD+jToAIb
Kj+99OLw3pCdhts+wxandKBMOWthZg+4YEM0zLXP6zECTSxW5x0=
=Ry88
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Sep 2017 21:28
(address . 28586@debbugs.gnu.org)
20170925192852.GA12757@jasmine.lan
On Mon, Sep 25, 2017 at 02:21:44PM -0400, Leo Famulari wrote:
Toggle quote (7 lines)
> This suggests to me that the Syncthing build process is not using the
> compiled objects of these packages but is instead trying to rebuild
> them.
>
> So, perhaps something is not quite right with the go-build-system — I'm
> not sure.

While debugging, I tried changing the go-build-system's build procedure
to this:

------
(define* (build #:key import-path #:allow-other-keys)
"Build the package named by IMPORT-PATH."
(unless (zero? (system* "go" "install" "-v" import-path))
(zero? (system* "go" "env"))))
------

However, when it encounters a failure, it does not seem to run `go env`:

------
[...]
/gnu/store/40m4imp31qkhl2yqvxm4dfaw0j6hgfr2-golang-github-com-golang-groupcache-lru-0.0.0-0.72d04f9/src/github.com/pkg/errors
/gnu/store/dn3hbj11bzk6ys3yj5k36k7a9fyg1zp8-golang-github-com-edsrzf-mmap-go-0.0.0-0.0bce6a6/src/github.com/pkg/errors
/gnu/store/h36806f660r6p5xzwsc89zrbfnvi6nwi-golang-github-com-d4l3k-messagediff-1.1.0-0.29f32d8/src/github.com/pkg/errors
exit status 1
exit status 1
phase `build' failed after 1.9 seconds
builder for `/gnu/store/0847mr1isq7mwc90rkja3fr0jc7z3lna-syncthing-0.14.37.drv' failed with exit code 1
@ build-failed /gnu/store/0847mr1isq7mwc90rkja3fr0jc7z3lna-syncthing-0.14.37.drv - 1 builder for `/gnu/store/0847mr1isq7mwc90rkja3fr0jc7z3lna-syncthing-0.14.37.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/0847mr1isq7mwc90rkja3fr0jc7z3lna-syncthing-0.14.37.drv' failed
------

I'm confused!
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlnJWPAACgkQJkb6MLrK
fwgGjxAAiUIkzgsjzXBZilnXFxBy9U5/x2FCNCU0oAhEUx8em/RUn1BBoa038HHn
xxtKk1g6M4nYj1ey4xRgnaouQ9mfgRHP76nA08kDAtdrnUKafIiCfIZ7JzRryo2s
yf0fgWzgeLIXfMYbHapVMcyyTIgeC23aX0YmPh1kgJqA3ktobzO5/hxTMmSnLBiL
HS+h8p9/7LKQcnmCFaMIqHVazQYdOQvpOObMpTRjXtkh7RbAmpZlXLvkicGhSaYq
ho3h7foiScM/NeWXXR9Fyd0lpg/UzmT8YyluhDTASzAnSBoBcJpnkTisslAzosz4
pgHbZiVBdOLIWuKixihlvX7dfcvOI4+hXqDM2vTos2PN0dBsWCZOauS2NEToPWxC
O7JpY/59evTT4RROokgaOMzGB8mL4g6UAgKRq4SwA0LRoyYTtKSUabcENCg+ko6H
7oIcsdc9kFXnWKj1oJgwpHqLiWOWcb3nXh85ZhrIXefFLK0RXmzPxY91pq8MoqJQ
vjW8WsjhgASloO4h8sixycAMO0a/CS4vrKjsNL1AehP0vemrYH96dRfWqedIsLMI
s6+soHAG8dJE3RK2B9J7oRJzCIEim6LQ65Jl/OPu1rxZDWfyzYl7AhLWYJXkUr0A
1dj0fvkvyRCWd1rpwItrma56LTpbBdvEN4/Jq9NZb7y8N4pgWHY=
=Xfu2
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 26 Sep 2017 09:41
Re: [bug#28586] [PATCH 2/2] gnu: Add Syncthing.
(name . Leo Famulari)(address . leo@famulari.name)(address . 28586@debbugs.gnu.org)
87d16d3o0f.fsf@gnu.org
Heya!

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (18 lines)
> On Mon, Sep 25, 2017 at 02:21:44PM -0400, Leo Famulari wrote:
>> This suggests to me that the Syncthing build process is not using the
>> compiled objects of these packages but is instead trying to rebuild
>> them.
>>
>> So, perhaps something is not quite right with the go-build-system — I'm
>> not sure.
>
> While debugging, I tried changing the go-build-system's build procedure
> to this:
>
> ------
> (define* (build #:key import-path #:allow-other-keys)
> "Build the package named by IMPORT-PATH."
> (unless (zero? (system* "go" "install" "-v" import-path))
> (zero? (system* "go" "env"))))
> ------

Note that it should always return a Boolean:

(or (zero? (system* "go" "install" …))
(begin ;we failed but we want to print debugging info
(system* "go" "env")
#f))

Toggle quote (11 lines)
> However, when it encounters a failure, it does not seem to run `go env`:
>
> ------
> [...]
> /gnu/store/40m4imp31qkhl2yqvxm4dfaw0j6hgfr2-golang-github-com-golang-groupcache-lru-0.0.0-0.72d04f9/src/github.com/pkg/errors
> /gnu/store/dn3hbj11bzk6ys3yj5k36k7a9fyg1zp8-golang-github-com-edsrzf-mmap-go-0.0.0-0.0bce6a6/src/github.com/pkg/errors
> /gnu/store/h36806f660r6p5xzwsc89zrbfnvi6nwi-golang-github-com-d4l3k-messagediff-1.1.0-0.29f32d8/src/github.com/pkg/errors
> exit status 1
> exit status 1
> phase `build' failed after 1.9 seconds

I think it just means that “go env” returned with exit code 1, no?

Ludo’.

PS: Great to see ‘go-build-system’ coming!
L
L
Leo Famulari wrote on 29 Sep 2017 21:24
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 28586@debbugs.gnu.org)
20170929192431.GA12405@jasmine.lan
On Tue, Sep 26, 2017 at 09:41:36AM +0200, Ludovic Courtès wrote:
Toggle quote (8 lines)
> Leo Famulari <leo@famulari.name> skribis:
> Note that it should always return a Boolean:
>
> (or (zero? (system* "go" "install" …))
> (begin ;we failed but we want to print debugging info
> (system* "go" "env")
> #f))

Ah, yes, thanks for the reminder.

Toggle quote (13 lines)
> > However, when it encounters a failure, it does not seem to run `go env`:
> >
> > ------
> > [...]
> > /gnu/store/40m4imp31qkhl2yqvxm4dfaw0j6hgfr2-golang-github-com-golang-groupcache-lru-0.0.0-0.72d04f9/src/github.com/pkg/errors
> > /gnu/store/dn3hbj11bzk6ys3yj5k36k7a9fyg1zp8-golang-github-com-edsrzf-mmap-go-0.0.0-0.0bce6a6/src/github.com/pkg/errors
> > /gnu/store/h36806f660r6p5xzwsc89zrbfnvi6nwi-golang-github-com-d4l3k-messagediff-1.1.0-0.29f32d8/src/github.com/pkg/errors
> > exit status 1
> > exit status 1
> > phase `build' failed after 1.9 seconds
>
> I think it just means that “go env” returned with exit code 1, no?

No, it prints 'exit status 1' twice even when the `go env` invocation is
removed from the build phase. This particular case was really about
making debugging easier for me. It's not necessary to run `go env` when
things fail.

I'm still trying to solve the previously mentioned issue about certain
inputs needing to be propagated...
L
L
Leo Famulari wrote on 2 Oct 2017 22:23
Re: go-build-system and Syncthing
(address . guix-patches@gnu.org)
20171002202325.GA12172@jasmine.lan
On Sun, Sep 24, 2017 at 04:36:51PM -0400, Leo Famulari wrote:
Toggle quote (3 lines)
> These patches add a go-build-system, a package for Syncthing, and
> Syncthing's dependencies.

Here is the latest revision of these patches. I'll push them in a couple
days if there are no further comments.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlnSoD0ACgkQJkb6MLrK
fwiGTA/+JPEK0ijkbmTxksmVvpg4nnF1QrosSMhq/05LFs1ln/wmRkIric8pm1gs
paJFaA/0xk5st3t6R8xEPI9kvgdHozaQkrlvuJ033G5XSd0OXbAftbCnb563LA60
JtExAHR+9gSRXpvh/SJDWPL3YYzKuSt2Uj5CYKitbA52YurmL5ij1Rj1PeysvjQm
ap6pYxwKkVgBHGqG3ElVWXtvAX8TJSHgVB/0BY096R/BoCQt2f9C5ur9sX7d4Jb7
6WKptNwLC8u354E5Jn9r0VXcAw7f6Mvnk+QgOmhjBxWySyLIO+u7+eMQBUl5w8TL
N2bixNOzlT+AZSRq8AWJpuqOZvU12DQ1JHzA2rgs0/iPxM8QxRC58wtx496WHmTK
JtGXbbo5dIRqXxx5uagZJ63ly5SEAAeZkaMYh6156Qz8Zel1L0REy5CXJOM9eDbD
6R7siDnC9nhEb926zPOLyNLg6h7AjOn99AbPtYJ2l11IIw3iFS3Waw4N3VzgFkZj
o16rcKYMbtT1loYM80X/bW7qcg+7nI7HxsT+B9PjUuc+c3o2QfxRBNX6SRZ3RWTQ
eDDTp5xyq74raxIsajSYGiLXHRZxOEiBgR9VvxcWCyUTkylWGaMPRM48PEQPGETM
GRGHWsR7nCoLc5VkiEYw1/ZCRGlSeNi2LD0GVSe4E7cA5bTifpU=
=SCAA
-----END PGP SIGNATURE-----


N
Re: [bug#28586] go-build-system and Syncthing
(name . Leo Famulari)(address . leo@famulari.name)(address . 28586@debbugs.gnu.org)
20171002210103.4huokkwrkhanmxig@abyayala
Leo Famulari transcribed 101K bytes:
Toggle quote (7 lines)
> On Sun, Sep 24, 2017 at 04:36:51PM -0400, Leo Famulari wrote:
> > These patches add a go-build-system, a package for Syncthing, and
> > Syncthing's dependencies.
>
> Here is the latest revision of these patches. I'll push them in a couple
> days if there are no further comments.

Would it be nitpicking to make the requirements of syncthing be individual commits?
Is this simply okay with initializing the file if it doesn't make any sense
to have smaller commit steps?


That's all I can add right now.

I'm excited to try the go-build-system out for some of the Go stuff I
wanted to package.
--
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlnSqQ8ACgkQ4i+bv+40
hYiriQ/+PmbFoVRr+BdMPvSN9BAnFVSAa/VwAqed2nWoYBzioIqpznNcEbK+Druu
FH5UlghlO4zpoE6GP81AnS4G4DQSzrnNqrCQ5CBU0pK1W9UHTMWtpDBX9mgYzC6b
iysZaWOk10qAPJakXnYvUFGnGJ1sJJfLFOGbCyUcJrCNFUdOHXepI7KDPgb/K8eE
urwzrbuX3Jy4ZTNTo9SwLYeZ4CcEWbB6w8w0hv+130Zoir1WP/TIOxDYLCNnXLAO
01sv41vllDtUq90EeqRx4p160db5HAuhSb1nNOdbaWcCKu/9lKgOBqC4+2R9JF+2
10AUyq+urGUcY8er1h+RUD0sVyAMCuKyYbdtTFVSRGTv9Xv+YQtr9liZlcJttlit
3Hy5dcVPwIm7LsHF0z1o/pTKP/HF2So5qMbyCgfDMVqMo5Nem6dUyoGBIJwR7bAS
VyfO+auSf02hWwR/UHvTvDQIzDoJ0jcR4Bf/vknQ7TWxLcADS5vfKNEBAiPnBN8/
5Qh4gicyJdH6ueZ9/QgiV9syOgQEhL9eIHoMS/I1s+PxtBFW9STcnRZxzkzVkkY3
qJ7Q3G4EzH8xleIfa9Lz1WHfFt+oHHGKjUrV8WJzzkRN0WxHt8JLHFfLie0d6BP4
JQ+GrenWd/PG2OYA8mljRxT7YasNoydsD0MQdSfg+VLwa0S00BE=
=xdyA
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 2 Oct 2017 23:42
(name . ng0)(address . ng0@infotropique.org)(address . 28586@debbugs.gnu.org)
20171002214259.GA25642@jasmine.lan
On Mon, Oct 02, 2017 at 09:01:03PM +0000, ng0 wrote:
Toggle quote (4 lines)
> Would it be nitpicking to make the requirements of syncthing be individual commits?
> Is this simply okay with initializing the file if it doesn't make any sense
> to have smaller commit steps?

I could do that (not sure if we have a policy or not). But I sent it as
one patch to make it easier to review.

Toggle quote (3 lines)
> I'm excited to try the go-build-system out for some of the Go stuff I
> wanted to package.

Please, try it and give feedback :)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlnSstsACgkQJkb6MLrK
fwix7w//bOpjDIAJp00N/JiMa4IdW3Ei46O9zuk17V2LsOSQgGYrI2oLNpAFRE2V
osOUqk5W0ysnQA8UsT4UQDIvYFQ6tLhjxQT3+iFNZAxawdkvmKRDxRYdhPGuvbxW
CPiUgCH25Kgmjie8MQuokOElqTGLE2w7gtFXInj3gkjrMfG/EFk9le2aEoA7+5l7
eifHGIjgd3xB8U4P+/5ZqjoK6xNqKxhBdh/0/q7a9YVqi6HvIKg9SP7NkhfWpyAB
XM9xrJ16zf3K8HUTjkpYTP2/xfVGi4feJYwS5cRI6DMqZWevkLD0mo5K0ri1tRSz
clsCTqzePdg2ZiLeSPFixoyNZnHF7buIPfOxS+clzKFt1NZbqPPFgEvbAr2cmcDC
C1nsCXj7UfX8slZAstcE6r5mPaK2z/WJDdrH7ESX71FT3/ipFr953eTgqm0B/BXV
FgtnyXJhcoB73TedFnjnrhYbpeDX8Z5JbIYrAgUhihARHYfIjP6nchj9dHZV2hSJ
RGHVeSnwLWyXfOxcMjElC0v4Y9at0/S/C6a2ODy5x5qNfn9AsaAZSdFLgd9CFEYM
10nIMIH8K1pQ3QeYQ3DepByxzllTegHolwPWD5yhWxLFf4hhw5XT4v6lW+E4TKvH
Nn3sepTAFvZkWGX+gQK9ic6Nit/iQ2rTYnsIB8kDhjFIg/IqN/Q=
=Om95
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 13 Oct 2017 03:47
Re: go-build-system and Syncthing
(address . 28586-done@debbugs.gnu.org)
20171013014750.GA21623@jasmine.lan
On Mon, Oct 02, 2017 at 04:23:25PM -0400, Leo Famulari wrote:
Toggle quote (7 lines)
> On Sun, Sep 24, 2017 at 04:36:51PM -0400, Leo Famulari wrote:
> > These patches add a go-build-system, a package for Syncthing, and
> > Syncthing's dependencies.
>
> Here is the latest revision of these patches. I'll push them in a couple
> days if there are no further comments.

Revised again and pushed as 947453a88df953cf877acbef3bf03b0d78d40746.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlngG0YACgkQJkb6MLrK
fwh1ug//VbalB6eZbTce1bKkyqMDR78rpJn7tk5ilh+Om0GSNFrCz0bpVms3NGLy
xcQN0vgSbRVwX/oo49fR9s2Vy9o6YPBzmUh+6wRCiSWi62nWDqA+MB4ucrVK+63O
Tb/tlGaMwCbeVRzFv4YQufjrgNBxpw94gJ5BtaMDA0i0FKaZ4V2EEOLTJsCTGG5O
cABJh+7u7CoDByGcaKsg0+eK2w/6d5DDD1WAy1qDnGip2q2LeFKKt5qsqvmuJp43
K56xqQgpTsMv74gLWSOFIa1Tq1EhnV36t72Iq6SB1/BOs4RTuAA/SsaNw9HtQA9s
IaZf2nlbLnixM5SadgfxgO2AUW0JxIRUlhGpAzmH7nKQnReINy78o7VtZowCogU7
UqOsqe0GlHJbDujWs7GX6JthcsNJwz33HntsrXxxulwXGLEOxe+FmQh+duNjHqke
vIggC1O+/Lb9yMaSSwIfypTTHVR5HI6AjXcySPwej/pQ3tMP2+xPmZA9K3Axp0g/
795PpxnDmiEut6WsYzeoKv3opb/Drnl1n/KSbG20reIiERyUlX/+Uh8iDY1dqae/
s8sBFB717xxcrArTL5CYkj5Jgp8ARKtJerHMNB5bqvkkAXBVa5rAlLFkOxC2Rl0E
e7fvnkjbGWwHXuZgKVzCXasCpyb3QcuuurxXxBhbU69aHCMckRs=
=zJOi
-----END PGP SIGNATURE-----


Closed
L
L
Ludovic Courtès wrote on 13 Oct 2017 10:39
Re: bug#28586: go-build-system and Syncthing
(address . 28586@debbugs.gnu.org)(address . leo@famulari.name)
87infjqw5h.fsf@gnu.org
Hi Leo,

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (10 lines)
> On Mon, Oct 02, 2017 at 04:23:25PM -0400, Leo Famulari wrote:
>> On Sun, Sep 24, 2017 at 04:36:51PM -0400, Leo Famulari wrote:
>> > These patches add a go-build-system, a package for Syncthing, and
>> > Syncthing's dependencies.
>>
>> Here is the latest revision of these patches. I'll push them in a couple
>> days if there are no further comments.
>
> Revised again and pushed as 947453a88df953cf877acbef3bf03b0d78d40746.

Thumbs up for all your work on this!

AFAICS it was a difficult path, to say the least, so I’m glad you
managed to drive it to completion. All those who were waiting for
Syncthing (and Prometheus, and…) can now go ahead. :-)

Ludo’.
?