[PATCH 0/2] New build system: copy-build-system

  • Done
  • quality assurance status badge
Details
9 participants
  • Alex Griffin
  • Giovanni Biscuolo
  • Jack Hill
  • Julien Lepiller
  • Mathieu Othacehe
  • Pierre Neidhardt
  • Nicolas Goaziou
  • Tobias Geerinckx-Rice
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 14 Feb 2020 13:51
(address . guix-patches@gnu.org)
20200214125144.4185-1-mail@ambrevar.xyz
This build system aims to be a more convenient alternative to the
trivial-build-system for packages that only need mere copying around.

Since it is based on the gnu-build-system, all packages necessary for archive
extraction are already included.

The new install-plan argument makes it particularly convenient to install
batches of files.


Pierre Neidhardt (2):
build-system: Add copy-build-system.
gnu: gcide: Use the copy-build-system.

Makefile.am | 2 +
doc/guix.texi | 57 +++++++++++
gnu/packages/dictionaries.scm | 22 +----
guix/build-system/copy.scm | 145 ++++++++++++++++++++++++++++
guix/build/copy-build-system.scm | 156 +++++++++++++++++++++++++++++++
5 files changed, 364 insertions(+), 18 deletions(-)
create mode 100644 guix/build-system/copy.scm
create mode 100644 guix/build/copy-build-system.scm

--
2.25.0
P
P
Pierre Neidhardt wrote on 14 Feb 2020 13:53
[PATCH 2/2] gnu: gcide: Use the copy-build-system.
(address . 39599@debbugs.gnu.org)
20200214125357.5262-2-mail@ambrevar.xyz
* gnu/packages/dictionaries.scm (gcide2)[build-system]: Use the
copy-build-system.
---
gnu/packages/dictionaries.scm | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index cd0a5db93c..d40c43f74e 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -31,6 +31,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system copy)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -109,25 +110,10 @@ acronyms distributed as an info document.")
(sha256
(base32
"1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
- (build-system trivial-build-system)
+ (build-system copy-build-system)
(arguments
- '(#:builder (begin
- (use-modules (guix build utils))
- (let* ((src (assoc-ref %build-inputs "source"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (out (assoc-ref %outputs "out"))
- (datadir (string-append out "/share/gcide")))
- (set-path-environment-variable "PATH" '("bin")
- (list tar xz))
- (mkdir-p datadir)
- (invoke "tar" "-C" datadir
- "--strip-components=1"
- "-xvf" src)))
- #:modules ((guix build utils))))
- (native-inputs
- `(("tar" ,tar)
- ("xz" ,xz)))
+ '(#:install-plan
+ '(("." "share/gcide/" #:exclude ("COPYING")))))
(synopsis "GNU Collaborative International Dictionary of English")
(description
"GCIDE is a free dictionary based on a combination of sources. It can
--
2.25.0
P
P
Pierre Neidhardt wrote on 14 Feb 2020 13:53
[PATCH 1/2] build-system: Add copy-build-system.
(address . 39599@debbugs.gnu.org)
20200214125357.5262-1-mail@ambrevar.xyz
* guix/build-system/copy.scm: New file.
* guix/build/copy-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'copy-build-system'.
---
Makefile.am | 2 +
doc/guix.texi | 57 +++++++++++
guix/build-system/copy.scm | 145 ++++++++++++++++++++++++++++
guix/build/copy-build-system.scm | 156 +++++++++++++++++++++++++++++++
4 files changed, 360 insertions(+)
create mode 100644 guix/build-system/copy.scm
create mode 100644 guix/build/copy-build-system.scm

Toggle diff (403 lines)
diff --git a/Makefile.am b/Makefile.am
index c6a2e6cf6c..e18c17d8b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,6 +122,7 @@ MODULES = \
guix/build-system/meson.scm \
guix/build-system/minify.scm \
guix/build-system/asdf.scm \
+ guix/build-system/copy.scm \
guix/build-system/glib-or-gtk.scm \
guix/build-system/gnu.scm \
guix/build-system/guile.scm \
@@ -169,6 +170,7 @@ MODULES = \
guix/build/go-build-system.scm \
guix/build/asdf-build-system.scm \
guix/build/bzr.scm \
+ guix/build/copy-build-system.scm \
guix/build/git.scm \
guix/build/hg.scm \
guix/build/glib-or-gtk-build-system.scm \
diff --git a/doc/guix.texi b/doc/guix.texi
index 42d7cfa2e8..d1ec214674 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6159,6 +6159,63 @@ parameters available to cargo. It will also remove an included
if they are defined by the crate.
@end defvr
+
+@defvr {Scheme Variable} copy-build-system
+@cindex (copy build system)
+This variable is exported by @code{(guix build-system copy)}. It
+supports builds of simple packages that don't require much compiling,
+mostly just moving files around.
+
+It adds much of the @code{gnu-build-system} packages to the set of
+inputs. Because of this, the @code{copy-build-system} does not require
+all the boilerplate code often implied by the
+@code{trivial-build-system}.
+
+To further simplify the file installation process, an
+@code{#:install-plan} argument is exposed to let the packaer specify
+which files go where.
+The install plan is a list of @code{(SOURCE TARGET [FILTERS])}.
+@code{FILTERS} are optional.
+
+@itemize
+@item When @code{SOURCE} matches a file or directory without trailing slash, install it to @code{TARGET}.
+ @itemize
+ @item If @code{TARGET} has a trailing slash, install @code{SOURCE} basename beneath @code{TARGET}.
+ @item Otherwise install @code{SOURCE} as @code{TARGET}.
+ @end itemize
+
+@item When @code{SOURCE} is a directory with a trailing slash, or when @code{FILTERS} are used,
+ the trailing slash of @code{TARGET} is implied.
+ @itemize
+ @item Without @code{FILTERS}, install the full @code{SOURCE} @emph{content} to @code{TARGET}.
+ The paths relative to @code{SOURCE} are preserved within @code{TARGET}.
+ @item With @code{FILTERS} among @code{#:include}, @code{#:include-regexp}, @code{exclude},
+ @code{#:exclude-regexp}:
+ @itemize
+ @item With @code{#:include}, install only the exact subpaths in the list.
+ @item With @code{#:include-regexp}, install subpaths matching the regexps in the list.
+ @item The @code{#:exclude} and @code{#:exclude-regexp} filters work similarly. Without @code{#:include} flags,
+ install every subpath but the files matching the exclusion filters.
+ If both inclusions and exclusions are specified, the exclusions are done
+ on the inclusion list.
+ @end itemize
+ @end itemize
+@end itemize
+
+Examples:
+
+@itemize
+@item @code{("foo/bar" "share/my-app/")}: Install @code{bar} to @code{share/my-app/bar}.
+@item @code{("foo/bar" "share/my-app/baz")}: Install @code{bar}t o @code{share/my-app/baz}.
+@item @code{("foo/" "share/my-app")}: Install the content of @code{foo} inside @code{share/my-app},
+ e.g. install @code{foo/sub/file} to @code{share/my-app/sub/file}.
+@item @code{("foo/" "share/my-app" #:include ("sub/file"))}: Install only @code{foo/sub/file} to
+@code{share/my-app/sub/file}.
+@item @code{("foo/sub" "share/my-app" #:include ("file"))}: Install @code{foo/sub/file} to
+@code{share/my-app/file}.
+@end itemize
+
+
@cindex Clojure (programming language)
@cindex simple Clojure build system
@defvr {Scheme Variable} clojure-build-system
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
new file mode 100644
index 0000000000..9686e7e5c2
--- /dev/null
+++ b/guix/build-system/copy.scm
@@ -0,0 +1,145 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;;
+;;; 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 copy)
+ #:use-module (guix store)
+ #: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)
+ #:use-module (srfi srfi-1)
+ #:export (%copy-build-system-modules
+ default-glibc
+ lower
+ copy-build
+ copy-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for simple packages that don't require much
+;; compilation, mostly just copying files around. This is implemented as an
+;; extension of `gnu-build-system'.
+;;
+;; Code:
+
+(define %copy-build-system-modules
+ ;; Build-side modules imported by default.
+ `((guix build copy-build-system)
+ ,@%gnu-build-system-modules))
+
+(define (default-glibc)
+ "Return the default glibc package."
+ ;; Do not use `@' to avoid introducing circular dependencies.
+ (let ((module (resolve-interface '(gnu packages base))))
+ (module-ref module 'glibc)))
+
+(define* (lower name
+ #:key source inputs native-inputs outputs system target
+ (glibc (default-glibc))
+ #:allow-other-keys
+ #:rest arguments)
+ "Return a bag for NAME."
+ (define private-keywords
+ '(#:source #:target #: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 native-inputs)
+ (outputs outputs)
+ (build copy-build)
+ (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (copy-build store name inputs
+ #:key (guile #f)
+ (outputs '("out"))
+ (install-plan ''(("." (".") "./")))
+ (search-paths '())
+ (out-of-source? #t)
+ (validate-runpath? #t)
+ (patch-shebangs? #t)
+ (strip-binaries? #t)
+ (strip-flags ''("--strip-debug"))
+ (strip-directories ''("lib" "lib64" "libexec"
+ "bin" "sbin"))
+ (phases '(@ (guix build copy-build-system)
+ %standard-phases))
+ (system (%current-system))
+ (imported-modules %copy-build-system-modules)
+ (modules '((guix build copy-build-system)
+ (guix build utils))))
+ "Build SOURCE using INSTALL-PLAN, and with INPUTS."
+ (define builder
+ `(begin
+ (use-modules ,@modules)
+ (copy-build #:source ,(match (assoc-ref inputs "source")
+ (((? derivation? source))
+ (derivation->output-path source))
+ ((source)
+ source)
+ (source
+ source))
+ #:system ,system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:install-plan ,install-plan
+ #:search-paths ',(map search-path-specification->sexp
+ search-paths)
+ #:phases ,phases
+ #:out-of-source? ,out-of-source?
+ #:validate-runpath? ,validate-runpath?
+ #:patch-shebangs? ,patch-shebangs?
+ #:strip-binaries? ,strip-binaries?
+ #:strip-flags ,strip-flags
+ #:strip-directories ,strip-directories)))
+
+ (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
+ #:system system
+ #:inputs inputs
+ #:modules imported-modules
+ #:outputs outputs
+ #:guile-for-build guile-for-build))
+
+(define copy-build-system
+ (build-system
+ (name 'copy)
+ (description "The standard copy build system")
+ (lower lower)))
+
+;;; copy.scm ends here
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
new file mode 100644
index 0000000000..c9c8f1165b
--- /dev/null
+++ b/guix/build/copy-build-system.scm
@@ -0,0 +1,156 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;;
+;;; 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 copy-build-system)
+ #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 ftw)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (%standard-phases
+ copy-build))
+
+;; Commentary:
+;;
+;; System for building packages that don't require much compilation, mostly
+;; only to copy files around.
+;;
+;; Code:
+
+(define* (install #:key install-plan outputs #:allow-other-keys)
+ "Copy files from the \"source\" build input to the \"out\" output according to INSTALL-PLAN.
+
+An install plan is a list of plans in the form:
+
+ (SOURCE TARGET [FILTERS])
+
+In the above, FILTERS are optional.
+
+- When SOURCE matches a file or directory without trailing slash, install it to
+ TARGET.
+ - If TARGET has a trailing slash, install SOURCE basename beneath TARGET.
+ - Otherwise install SOURCE as TARGET.
+
+- When SOURCE is a directory with a trailing slash, or when FILTERS are used,
+ the trailing slash of TARGET is implied.
+ - Without FILTERS, install the full SOURCE _content_ to TARGET.
+ The paths relative to SOURCE are preserved within TARGET.
+ - With FILTERS among `#:include`, `#:include-regexp`, `#:exclude`,
+ `#:exclude-regexp`:
+ - With `#:include`, install only the exact subpaths in the list.
+ - With `#:include-regexp`, install subpaths matching the regexps in the list.
+ - The `#:exclude*` FILTERS work similarly. Without `#:include*` flags,
+ install every subpath but the files matching the `#:exlude*` filters.
+ If both `#:include*` and `#:exclude*` are specified, the exclusion is done
+ on the inclusion list.
+
+Examples:
+
+- `(\"foo/bar\" \"share/my-app/\")`: Install bar to \"share/my-app/bar\".
+- `(\"foo/bar\" \"share/my-app/baz\")`: Install bar to \"share/my-app/baz\".
+- `(\"foo/\" \"share/my-app\")`: Install the content of foo inside \"share/my-app\",
+ e.g. install \"foo/sub/file\" to \"share/my-app/sub/file\".
+- `(\"foo/\" \"share/my-app\" #:include (\"sub/file\"))`: Install only \"foo/sub/file\" to
+\"share/my-app/sub/file\".
+- `(\"foo/sub\" \"share/my-app\" #:include (\"file\"))`: Install \"foo/sub/file\" to
+\"share/my-app/file\"."
+ (define (install-simple source target)
+ "TARGET must point to a store location."
+ (set! target (if (string-suffix? "/" target)
+ (string-append target (basename source))
+ target))
+ (mkdir-p (dirname target))
+ (copy-recursively source target))
+
+ (define (install-file file target)
+ (let ((dest (string-append target
+ (if (string-suffix? "/" target)
+ (string-append "/" file)
+ file))))
+ (format (current-output-port) "`~a' -> `~a'~%" file dest)
+ (mkdir-p (dirname dest))
+ (copy-file file dest)))
+
+ (define (make-file-predicate matches matches-regexp)
+ (if (or matches matches-regexp)
+ (lambda (file)
+ (any (lambda (pred) (pred file))
+ (append
+ (map (lambda (str)
+ (lambda (f) (string-contains f str)))
+ (or matches '()))
+ (map (lambda (regexp)
+ (lambda (f) (regexp-exec (make-regexp regexp) f)))
+ (or matches-regexp '())))))
+ (const #t)))
+
+ (define* (install-file-list source target #:key include exclude include-regexp exclude-regexp)
+ (let* ((exclusion-pred (negate (make-file-predicate exclude exclude-regexp)))
+ (inclusion-pred (make-file-predicate include include-regexp))
+ (file-list
+ (filter exclusion-pred
+ ;; We must use switch current directory to source so
+ ;; that `find-files' returns file paths relative to
+ ;; source.
+ (with-directory-excursion source
+ (find-files "." (lambda (file _stat)
+ (inclusion-pred file)))))))
+ (map (cut install-file <> (if (string-suffix? "/" target)
+ target
+ (string-append target "/")))
+ file-list)))
+
+ (define* (install source target #:key include exclude include-regexp exclude-regexp)
+ (set! target (string-append (assoc-ref outputs "out") "/" target))
+ (let ((filters? (or include exclude include-regexp exclude-regexp)))
+ (when (and (not (file-is-directory? source))
+ filters?)
+ (error "Cannot use filters when SOURCE is a file."))
+ (let ((multi-files-in-source?
+ (or (string-suffix? "/" source)
+ (and (file-is-directory? source)
+ filters?))))
+ (if multi-files-in-source?
+ (install-file-list source target
+ #:include include
+ #:exclude exclude
+ #:include-regexp include-regexp
+ #:exclude-regexp exclude-regexp)
+ (install-simple source target)))))
+
+ (for-each (lambda (plan) (apply install plan)) install-plan)
+ #t)
+
+(define %standard-phases
+ ;; Everything is as with the GNU Build System except for the `configure'
+ ;; , `build', `check' and `install' phases.
+ (modify-phases gnu:%standard-phases
+ (delete 'bootstrap)
+ (delete 'configure)
+ (delete 'build)
+ (delete 'check)
+ (replace 'install install)))
+
+(define* (copy-build #:key inputs (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ "Build the given package, applying all of PHASES in order."
+ (apply gnu:gnu-build #:inputs inputs #:phases phases args))
+
+;;; copy-build-system.scm ends here
--
2.25.0
G
G
Giovanni Biscuolo wrote on 14 Feb 2020 14:39
87sgjd9tkx.fsf@roquette.mug.biscuolo.net
Pierre Neidhardt <mail@ambrevar.xyz> writes:

[...]

Toggle quote (23 lines)
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 42d7cfa2e8..d1ec214674 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -6159,6 +6159,63 @@ parameters available to cargo. It will also remove an included
> if they are defined by the crate.
> @end defvr
>
> +
> +@defvr {Scheme Variable} copy-build-system
> +@cindex (copy build system)
> +This variable is exported by @code{(guix build-system copy)}. It
> +supports builds of simple packages that don't require much compiling,
> +mostly just moving files around.
> +
> +It adds much of the @code{gnu-build-system} packages to the set of
> +inputs. Because of this, the @code{copy-build-system} does not require
> +all the boilerplate code often implied by the
> +@code{trivial-build-system}.
> +
> +To further simplify the file installation process, an
> +@code{#:install-plan} argument is exposed to let the packaer specify

s/packaer/packager

[...]

Thanks! Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAl5Gov4ACgkQ030Op87M
ORKkBhAA1UrX52H5kKX9EYlMpo7bpqdrEWNFLTJ95zSI0IugpnscWoarA6Jysr1k
fG+kbGdXLVVmd23pBb1aEVqe6W9RM1lHqY99D7FIRLuqUukp28PkRN09OXkd/pY3
j7o+iTqj2RoFIfk3vIUoTZ5LQuAnzmmYP32Tmh43aTctecrXHtzKJrCOd+/MfqtQ
/Q6hCIMvjliQuJACveqK5xJQoVMozlV6OThIIRsY3mU2T7d4R/kaplDHTXneeEN9
BxhBuFA+xyEmymq+lk7kY299Au0sXviOUc8togSiB5kNkjChK5z3kSNswz7rSK9G
57VJ5QXgHFO03ieVqyfRPFkHKgzlDNvDI4w6Jn8FjXh5Cr0VBm89+LGR7JsSrL3P
MIgQPtLO0GP2VyAciBo17kf6xp0wiQZy4lAEnMqR4CJ5HSU9/V7BRWiipv4eErf+
s0bN5kcX+LNCvZc2Vyu9PzCyJITFjbbQor/axexl0IMs+ccbqtluayU6rqGbcIxq
4RAld7ldcP2Jg6TyclWmSRtWAxSjOfdF//i179gC2/WMOrMAo9ysu9WW6NaPbBeW
HPIZN04sA7XYwQPJo7tD7GKP49fw3mqND6SIKtdoiFn4q5dAKwuRNXV7/FtKetDS
xFR+9cAq16Fc7YuQXV7SxLKblJyhuDLZpojh8GvAXymjR0dqGmE=
=Po2V
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 16 Feb 2020 14:16
87o8tyu0y5.fsf@ambrevar.xyz
Note to myself: maybe rename "install-simple" to "install-single".

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5JQLIACgkQm9z0l6S7
zH971Af/Yx4erCEaqiSekOpuXaFBxw0vk9uJLPYX2juAfZd3QU2xfZtkgAtPQZQ0
Yzrr5k1Om1EJO60TwFm/jKImbkhcUGRnY9m0Ted8fHAkZ+8QwZ/Uf9l/p1enFLiE
fET+lHGoNkbP//KX7FL0vwUVKoXrFzZz31Gj+bDsvfVGYB1TngIYhzgY981/jotB
tREaJzMNpzeoOYHVReoAxaXkwhld8pL2VrKzKMKZ4LKy1MoyIB+iYnKi5RvcKkuq
tmIKBbTx1NdVe4Wye6LolRpBbwL6u9wmaGNPr8BqPNNq2sb0/sTDQRyI8v0SWoYr
sGkkqWeB92jmXKb2QqRPPqtMfmETSA==
=5Po5
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 17 Feb 2020 12:12
[PATCH 2/4] gnu: gcide: Use the copy-build-system.
(address . 39599@debbugs.gnu.org)
20200217111228.23716-2-mail@ambrevar.xyz
* gnu/packages/dictionaries.scm (gcide2)[build-system]: Use the
copy-build-system.
---
gnu/packages/dictionaries.scm | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index cd0a5db93c..d40c43f74e 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -31,6 +31,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system copy)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -109,25 +110,10 @@ acronyms distributed as an info document.")
(sha256
(base32
"1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
- (build-system trivial-build-system)
+ (build-system copy-build-system)
(arguments
- '(#:builder (begin
- (use-modules (guix build utils))
- (let* ((src (assoc-ref %build-inputs "source"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (out (assoc-ref %outputs "out"))
- (datadir (string-append out "/share/gcide")))
- (set-path-environment-variable "PATH" '("bin")
- (list tar xz))
- (mkdir-p datadir)
- (invoke "tar" "-C" datadir
- "--strip-components=1"
- "-xvf" src)))
- #:modules ((guix build utils))))
- (native-inputs
- `(("tar" ,tar)
- ("xz" ,xz)))
+ '(#:install-plan
+ '(("." "share/gcide/" #:exclude ("COPYING")))))
(synopsis "GNU Collaborative International Dictionary of English")
(description
"GCIDE is a free dictionary based on a combination of sources. It can
--
2.25.0
P
P
Pierre Neidhardt wrote on 17 Feb 2020 12:12
[PATCH 3/4] gnu: Add clojure-wrapper.
(address . 39599@debbugs.gnu.org)
20200217111228.23716-3-mail@ambrevar.xyz
* gnu/packages/clojure.scm (clojure-wrapper): New variable.
---
gnu/packages/clojure.scm | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index 9a1ceed66c..f34e4dadab 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -1,8 +1,9 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Jesse Gibbons <jgibbons2357@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system ant)
#:use-module (guix build-system clojure)
+ #:use-module (guix build-system copy)
#:use-module (ice-9 match))
(define-public clojure
@@ -321,3 +323,29 @@ tree.
"The @code{tools.cli} library provides Clojure programmers with tools to
work with command-line arguments.")
(license license:epl1.0)))
+
+(define-public clojure-wrapper
+ (package
+ (name "clojure-wrapper")
+ (version "1.10.1.507")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/clojure/brew-install.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zipz22pszv4vls4qhxkia8gm86s1wkahr0jdbqhc46mpd8n54fz"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ `(("src/main/resources/" "bin/" #:include ("clj" "clojure"))
+ ("doc/clojure.1" "share/man/man1/")
+ ("epl.html" ,,(string-append "share/doc/clojure-" (package-version clojure) "/")))))
+ (synopsis "Clojure launch scripts")
+ (description "Scripts to launch Clojure from the command line.
+Without these scripts a user would need to run jar with the Clojure jar's
+location.")
+ (home-page "https://clojure.org/")
+ (license license:epl1.0)))
--
2.25.0
P
P
Pierre Neidhardt wrote on 17 Feb 2020 12:12
[PATCH 4/4] gnu: net-base: Use copy build system.
(address . 39599@debbugs.gnu.org)
20200217111228.23716-4-mail@ambrevar.xyz
* gnu/packages/admin.scm (net-base)[build-system]: Use copy-build-system.
---
gnu/packages/admin.scm | 29 ++++++-----------------------
1 file changed, 6 insertions(+), 23 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 4780fe124e..1f384edb2c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -54,6 +54,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system emacs)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
@@ -566,30 +567,12 @@ to allow automatic login and starting any app.")
(sha256
(base32
"12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
- (build-system trivial-build-system)
+ (build-system copy-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder (begin
- (use-modules (guix build utils)
- (srfi srfi-26))
-
- (let* ((source (assoc-ref %build-inputs "source"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (output (assoc-ref %outputs "out"))
- (etc (string-append output "/etc")))
- (setenv "PATH" (string-append xz "/bin"))
- (invoke (string-append tar "/bin/tar") "xvf"
- source)
- (chdir ,(string-append "netbase-" version))
- (mkdir-p etc)
- (for-each copy-file
- '("etc-services" "etc-protocols" "etc-rpc")
- (map (cut string-append etc "/" <>)
- '("services" "protocols" "rpc")))
- #t))))
- (native-inputs `(("tar" ,tar)
- ("xz" ,xz)))
+ `(#:install-plan
+ `(("etc-services" "etc/services")
+ ("etc-protocols" "etc/protocols")
+ ("etc-rpc" "etc/rpc"))))
(synopsis "IANA protocol, port, and RPC number assignments")
(description
"This package provides the /etc/services, /etc/protocols, and /etc/rpc
--
2.25.0
P
P
Pierre Neidhardt wrote on 17 Feb 2020 12:12
[PATCH 1/4] build-system: Add copy-build-system.
(address . 39599@debbugs.gnu.org)
20200217111228.23716-1-mail@ambrevar.xyz
* guix/build-system/copy.scm: New file.
* guix/build/copy-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'copy-build-system'.
---
Makefile.am | 2 +
doc/guix.texi | 58 ++++++++++++
guix/build-system/copy.scm | 145 ++++++++++++++++++++++++++++
guix/build/copy-build-system.scm | 156 +++++++++++++++++++++++++++++++
4 files changed, 361 insertions(+)
create mode 100644 guix/build-system/copy.scm
create mode 100644 guix/build/copy-build-system.scm

Toggle diff (404 lines)
diff --git a/Makefile.am b/Makefile.am
index c6a2e6cf6c..e18c17d8b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,6 +122,7 @@ MODULES = \
guix/build-system/meson.scm \
guix/build-system/minify.scm \
guix/build-system/asdf.scm \
+ guix/build-system/copy.scm \
guix/build-system/glib-or-gtk.scm \
guix/build-system/gnu.scm \
guix/build-system/guile.scm \
@@ -169,6 +170,7 @@ MODULES = \
guix/build/go-build-system.scm \
guix/build/asdf-build-system.scm \
guix/build/bzr.scm \
+ guix/build/copy-build-system.scm \
guix/build/git.scm \
guix/build/hg.scm \
guix/build/glib-or-gtk-build-system.scm \
diff --git a/doc/guix.texi b/doc/guix.texi
index 42d7cfa2e8..578ae9a43d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6159,6 +6159,64 @@ parameters available to cargo. It will also remove an included
if they are defined by the crate.
@end defvr
+
+@defvr {Scheme Variable} copy-build-system
+@cindex (copy build system)
+This variable is exported by @code{(guix build-system copy)}. It
+supports builds of simple packages that don't require much compiling,
+mostly just moving files around.
+
+It adds much of the @code{gnu-build-system} packages to the set of
+inputs. Because of this, the @code{copy-build-system} does not require
+all the boilerplate code often implied by the
+@code{trivial-build-system}.
+
+To further simplify the file installation process, an
+@code{#:install-plan} argument is exposed to let the packaer specify
+which files go where.
+The install plan is a list of @code{(SOURCE TARGET [FILTERS])}.
+@code{FILTERS} are optional.
+
+@itemize
+@item When @code{SOURCE} matches a file or directory without trailing slash, install it to @code{TARGET}.
+ @itemize
+ @item If @code{TARGET} has a trailing slash, install @code{SOURCE} basename beneath @code{TARGET}.
+ @item Otherwise install @code{SOURCE} as @code{TARGET}.
+ @end itemize
+
+@item When @code{SOURCE} is a directory with a trailing slash, or when @code{FILTERS} are used,
+ the trailing slash of @code{TARGET} is implied.
+ @itemize
+ @item Without @code{FILTERS}, install the full @code{SOURCE} @emph{content} to @code{TARGET}.
+ The paths relative to @code{SOURCE} are preserved within @code{TARGET}.
+ @item With @code{FILTERS} among @code{#:include}, @code{#:include-regexp}, @code{exclude},
+ @code{#:exclude-regexp}:
+ @itemize
+ @item With @code{#:include}, install only the paths which suffix exactly matches
+ one of the elements in the list.
+ @item With @code{#:include-regexp}, install subpaths matching the regexps in the list.
+ @item The @code{#:exclude} and @code{#:exclude-regexp} filters work similarly. Without @code{#:include} flags,
+ install every subpath but the files matching the exclusion filters.
+ If both inclusions and exclusions are specified, the exclusions are done
+ on the inclusion list.
+ @end itemize
+ @end itemize
+@end itemize
+
+Examples:
+
+@itemize
+@item @code{("foo/bar" "share/my-app/")}: Install @code{bar} to @code{share/my-app/bar}.
+@item @code{("foo/bar" "share/my-app/baz")}: Install @code{bar}t o @code{share/my-app/baz}.
+@item @code{("foo/" "share/my-app")}: Install the content of @code{foo} inside @code{share/my-app},
+ e.g. install @code{foo/sub/file} to @code{share/my-app/sub/file}.
+@item @code{("foo/" "share/my-app" #:include ("sub/file"))}: Install only @code{foo/sub/file} to
+@code{share/my-app/sub/file}.
+@item @code{("foo/sub" "share/my-app" #:include ("file"))}: Install @code{foo/sub/file} to
+@code{share/my-app/file}.
+@end itemize
+
+
@cindex Clojure (programming language)
@cindex simple Clojure build system
@defvr {Scheme Variable} clojure-build-system
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
new file mode 100644
index 0000000000..9686e7e5c2
--- /dev/null
+++ b/guix/build-system/copy.scm
@@ -0,0 +1,145 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;;
+;;; 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 copy)
+ #:use-module (guix store)
+ #: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)
+ #:use-module (srfi srfi-1)
+ #:export (%copy-build-system-modules
+ default-glibc
+ lower
+ copy-build
+ copy-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for simple packages that don't require much
+;; compilation, mostly just copying files around. This is implemented as an
+;; extension of `gnu-build-system'.
+;;
+;; Code:
+
+(define %copy-build-system-modules
+ ;; Build-side modules imported by default.
+ `((guix build copy-build-system)
+ ,@%gnu-build-system-modules))
+
+(define (default-glibc)
+ "Return the default glibc package."
+ ;; Do not use `@' to avoid introducing circular dependencies.
+ (let ((module (resolve-interface '(gnu packages base))))
+ (module-ref module 'glibc)))
+
+(define* (lower name
+ #:key source inputs native-inputs outputs system target
+ (glibc (default-glibc))
+ #:allow-other-keys
+ #:rest arguments)
+ "Return a bag for NAME."
+ (define private-keywords
+ '(#:source #:target #: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 native-inputs)
+ (outputs outputs)
+ (build copy-build)
+ (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (copy-build store name inputs
+ #:key (guile #f)
+ (outputs '("out"))
+ (install-plan ''(("." (".") "./")))
+ (search-paths '())
+ (out-of-source? #t)
+ (validate-runpath? #t)
+ (patch-shebangs? #t)
+ (strip-binaries? #t)
+ (strip-flags ''("--strip-debug"))
+ (strip-directories ''("lib" "lib64" "libexec"
+ "bin" "sbin"))
+ (phases '(@ (guix build copy-build-system)
+ %standard-phases))
+ (system (%current-system))
+ (imported-modules %copy-build-system-modules)
+ (modules '((guix build copy-build-system)
+ (guix build utils))))
+ "Build SOURCE using INSTALL-PLAN, and with INPUTS."
+ (define builder
+ `(begin
+ (use-modules ,@modules)
+ (copy-build #:source ,(match (assoc-ref inputs "source")
+ (((? derivation? source))
+ (derivation->output-path source))
+ ((source)
+ source)
+ (source
+ source))
+ #:system ,system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:install-plan ,install-plan
+ #:search-paths ',(map search-path-specification->sexp
+ search-paths)
+ #:phases ,phases
+ #:out-of-source? ,out-of-source?
+ #:validate-runpath? ,validate-runpath?
+ #:patch-shebangs? ,patch-shebangs?
+ #:strip-binaries? ,strip-binaries?
+ #:strip-flags ,strip-flags
+ #:strip-directories ,strip-directories)))
+
+ (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
+ #:system system
+ #:inputs inputs
+ #:modules imported-modules
+ #:outputs outputs
+ #:guile-for-build guile-for-build))
+
+(define copy-build-system
+ (build-system
+ (name 'copy)
+ (description "The standard copy build system")
+ (lower lower)))
+
+;;; copy.scm ends here
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
new file mode 100644
index 0000000000..ea37ea0161
--- /dev/null
+++ b/guix/build/copy-build-system.scm
@@ -0,0 +1,156 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;;
+;;; 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 copy-build-system)
+ #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 ftw)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (%standard-phases
+ copy-build))
+
+;; Commentary:
+;;
+;; System for building packages that don't require much compilation, mostly
+;; only to copy files around.
+;;
+;; Code:
+
+(define* (install #:key install-plan outputs #:allow-other-keys)
+ "Copy files from the \"source\" build input to the \"out\" output according to INSTALL-PLAN.
+
+An install plan is a list of plans in the form:
+
+ (SOURCE TARGET [FILTERS])
+
+In the above, FILTERS are optional.
+
+- When SOURCE matches a file or directory without trailing slash, install it to
+ TARGET.
+ - If TARGET has a trailing slash, install SOURCE basename beneath TARGET.
+ - Otherwise install SOURCE as TARGET.
+
+- When SOURCE is a directory with a trailing slash, or when FILTERS are used,
+ the trailing slash of TARGET is implied.
+ - Without FILTERS, install the full SOURCE _content_ to TARGET.
+ The paths relative to SOURCE are preserved within TARGET.
+ - With FILTERS among `#:include`, `#:include-regexp`, `#:exclude`,
+ `#:exclude-regexp`:
+ - With `#:include`, install only the paths which suffix exactly matches
+ one of the elements in the list.
+ - With `#:include-regexp`, install subpaths matching the regexps in the list.
+ - The `#:exclude*` FILTERS work similarly. Without `#:include*` flags,
+ install every subpath but the files matching the `#:exlude*` filters.
+ If both `#:include*` and `#:exclude*` are specified, the exclusion is done
+ on the inclusion list.
+
+Examples:
+
+- `(\"foo/bar\" \"share/my-app/\")`: Install bar to \"share/my-app/bar\".
+- `(\"foo/bar\" \"share/my-app/baz\")`: Install bar to \"share/my-app/baz\".
+- `(\"foo/\" \"share/my-app\")`: Install the content of foo inside \"share/my-app\",
+ e.g. install \"foo/sub/file\" to \"share/my-app/sub/file\".
+- `(\"foo/\" \"share/my-app\" #:include (\"sub/file\"))`: Install only \"foo/sub/file\" to
+\"share/my-app/sub/file\".
+- `(\"foo/sub\" \"share/my-app\" #:include (\"file\"))`: Install \"foo/sub/file\" to
+\"share/my-app/file\"."
+ (define (install-simple source target)
+ "TARGET must point to a store location."
+ (set! target (if (string-suffix? "/" target)
+ (string-append target (basename source))
+ target))
+ (mkdir-p (dirname target))
+ (copy-recursively source target))
+
+ (define (install-file file target)
+ (let ((dest (string-append target
+ (if (string-suffix? "/" target)
+ (string-append "/" file)
+ file))))
+ (format (current-output-port) "`~a' -> `~a'~%" file dest)
+ (mkdir-p (dirname dest))
+ (copy-file file dest)))
+
+ (define* (make-file-predicate matches matches-regexp #:optional (default-value #t))
+ (if (or matches matches-regexp)
+ (lambda (file)
+ (any (lambda (pred) (pred file))
+ (append
+ (map (lambda (str)
+ (lambda (f) (string-suffix? str f)))
+ (or matches '()))
+ (map (lambda (regexp)
+ (lambda (f) (regexp-exec (make-regexp regexp) f)))
+ (or matches-regexp '())))))
+ (const default-value)))
+
+ (define* (install-file-list source target #:key include exclude include-regexp exclude-regexp)
+ ;; We must use switch current directory to source so that `find-files'
+ ;; returns file paths relative to source.
+ (with-directory-excursion source
+ (let* ((exclusion-pred (negate (make-file-predicate exclude exclude-regexp #f)))
+ (inclusion-pred (make-file-predicate include include-regexp))
+ (file-list
+ (filter! exclusion-pred
+ (find-files "." (lambda (file _stat)
+ (inclusion-pred file))))))
+ (map (cut install-file <> (if (string-suffix? "/" target)
+ target
+ (string-append target "/")))
+ file-list))))
+
+ (define* (install source target #:key include exclude include-regexp exclude-regexp)
+ (set! target (string-append (assoc-ref outputs "out") "/" target))
+ (let ((filters? (or include exclude include-regexp exclude-regexp)))
+ (when (and (not (file-is-directory? source))
+ filters?)
+ (error "Cannot use filters when SOURCE is a file."))
+ (let ((multi-files-in-source?
+ (or (string-suffix? "/" source)
+ (and (file-is-directory? source)
+ filters?))))
+ (if multi-files-in-source?
+ (install-file-list source target
+ #:include include
+ #:exclude exclude
+ #:include-regexp include-regexp
+ #:exclude-regexp exclude-regexp)
+ (install-simple source target)))))
+
+ (for-each (lambda (plan) (apply install plan)) install-plan)
+ #t)
+
+(define %standard-phases
+ ;; Everything is as with the GNU Build System except for the `configure'
+ ;; , `build', `check' and `install' phases.
+ (modify-phases gnu:%standard-phases
+ (delete 'bootstrap)
+ (delete 'configure)
+ (delete 'build)
+ (delete 'check)
+ (replace 'install install)))
+
+(define* (copy-build #:key inputs (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ "Build the given package, applying all of PHASES in order."
+ (apply gnu:gnu-build #:inputs inputs #:phases phases args))
+
+;;; copy-build-system.scm ends here
--
2.25.0
M
M
Mathieu Othacehe wrote on 17 Feb 2020 12:48
(address . guix-patches@gnu.org)(address . 39599@debbugs.gnu.org)
87tv3po2oy.fsf@gmail.com
Hey Pierre,

Thanks for this patch! A few remarks below.

Toggle quote (1 lines)
> +@item @code{("foo/bar" "share/my-app/baz")}: Install @code{bar}t o @code{share/my-app/baz}.
^
typo

Toggle quote (2 lines)
> + (and (not target) ;XXX: no cross-compilation

Why don't we support cross-compilation here?

Toggle quote (4 lines)
> + (set! target (if (string-suffix? "/" target)
> + (string-append target (basename source))
> + target))

We could use let instead of set!, right?

Toggle quote (13 lines)
> + (define* (make-file-predicate matches matches-regexp #:optional (default-value #t))
> + (if (or matches matches-regexp)
> + (lambda (file)
> + (any (lambda (pred) (pred file))
> + (append
> + (map (lambda (str)
> + (lambda (f) (string-suffix? str f)))
> + (or matches '()))
> + (map (lambda (regexp)
> + (lambda (f) (regexp-exec (make-regexp regexp) f)))
> + (or matches-regexp '())))))
> + (const default-value)))

You could maybe explain a bit what this function does. And how 'file'
differs from 'f'.

Thanks,

Mathieu
A
A
Alex Griffin wrote on 20 Feb 2020 02:06
Re: [PATCH 1/4] build-system: Add copy-build-system.
9a61841f-e79b-469f-af02-4a739cb0c5f2@www.fastmail.com
I had to revert your documentation changes to get Guix to compile. I think you are missing '@end defvr' somewhere. Also, I packaged PaperWM using copy-build-system as an additional test case. The patch is attached.

Good work, Pierre!
--
Alex Griffin
From 5320c5a9e1fc0c4505328bf319cd0b010f66ebb8 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Wed, 19 Feb 2020 15:46:55 -0600
Subject: [PATCH] gnu: Add gnome-shell-extension-paperwm.

* gnu/packages/gnome-xyz.scm (gnome-shell-extension-paperwm): New variable.
---
gnu/packages/gnome-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 7f375fefc5..06af41aea6 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
(define-module (gnu packages gnome-xyz)
#:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system copy)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
@@ -304,6 +306,32 @@ It uses ES6 syntax and claims to be more actively maintained than others.")
(home-page "https://extensions.gnome.org/extension/2182/noannoyance/")
(license license:gpl2)))
+(define-public gnome-shell-extension-paperwm
+ (package
+ (name "gnome-shell-extension-paperwm")
+ (version "34.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/paperwm/PaperWM.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qry75f696pgmd9yzqvwhq5h6cipin2fvk7h881g29cjcpxim37a"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("." "share/gnome-shell/extensions/paperwm@hedning:matrix.org"
+ #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
+ "\\.xml$" "\\.compiled$")))))
+ (home-page "https://github.com/paperwm/PaperWM")
+ (synopsis "Tiled scrollable window management for GNOME Shell")
+ (description "PaperWM is an experimental GNOME Shell extension providing
+scrollable tiling of windows and per monitor workspaces. It's inspired by paper
+notebooks and tiling window managers.")
+ (license license:gpl3)))
+
(define-public numix-theme
(package
(name "numix-theme")
--
2.25.0
P
P
Pierre Neidhardt wrote on 20 Feb 2020 09:40
87ftf57itl.fsf@ambrevar.xyz
Great, I'll merge tomorrow then if no one objects!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5ORfYACgkQm9z0l6S7
zH+N8Qf+Iu8KqmggSoF20UHFIZOqEKpM9jWew/IvH77wma0hu92GLLPvt7m8spOL
RjMLWDdETvyX3sPs00eGcOXv2/mGnlR5Lxf5YCHQZhX6WIuicXb0pfcC7Wz/j1Bz
GvJZ3tWwg8S6EqWc3HyIVcEtXW9VA6pVkDpA87O92udWVaF5C0b2uR3k1tZLP5X9
onb9BE+etcOiI1cZP/MYa0r1W8mYjCut5v3kVmewlLvAUCdV3lhwiQEsekrqqBT6
9VDlGWVczBhH2A163FNMhqidfwMJxw6U4M35FOoVsY9G6rszjej9gsGqWMhEvrwp
9UgZsFiTsKuOJ8Q7WtxAnH43XpYbvw==
=D9II
-----END PGP SIGNATURE-----

M
R
R
Ricardo Wurmus wrote on 20 Feb 2020 10:47
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 39599@debbugs.gnu.org)
87ftf5lhep.fsf@elephly.net
Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (13 lines)
> + (define* (make-file-predicate matches matches-regexp #:optional (default-value #t))
> + (if (or matches matches-regexp)
> + (lambda (file)
> + (any (lambda (pred) (pred file))
> + (append
> + (map (lambda (str)
> + (lambda (f) (string-suffix? str f)))
> + (or matches '()))
> + (map (lambda (regexp)
> + (lambda (f) (regexp-exec (make-regexp regexp) f)))
> + (or matches-regexp '())))))
> + (const default-value)))

This looks too complicated.

I think this is clearer:

Toggle snippet (16 lines)
(define* (make-file-predicate suffixes matches-regexp #:optional (default-value #t))
(if (or suffixes matches-regexp)
(let* ((suffixes (or suffixes '()))
(regexps (map make-regexp (or matches-regexp '())))
(predicates (append
(map (lambda (str)
(cut string-suffix? str <>))
suffixes)
(map (lambda (regexp)
(cut regexp-exec regexp <>))
regexps))))
(lambda (file)
(any (cut <> file) predicates)))
(const default-value)))

Also, as Mathieu wrote, please don’t use SET!.

--
Ricardo
P
P
Pierre Neidhardt wrote on 20 Feb 2020 11:00
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 39599@debbugs.gnu.org)
877e0h7f3z.fsf@ambrevar.xyz
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (17 lines)
> --8<---------------cut here---------------start------------->8---
> (define* (make-file-predicate suffixes matches-regexp #:optional (default-value #t))
> (if (or suffixes matches-regexp)
> (let* ((suffixes (or suffixes '()))
> (regexps (map make-regexp (or matches-regexp '())))
> (predicates (append
> (map (lambda (str)
> (cut string-suffix? str <>))
> suffixes)
> (map (lambda (regexp)
> (cut regexp-exec regexp <>))
> regexps))))
> (lambda (file)
> (any (cut <> file) predicates)))
> (const default-value)))
> --8<---------------cut here---------------end--------------->8---

Good suggestion, thanks!

The logic of this function is a bit convoluted in my opinion, but I
can't think of something simpler and just as short. But since it's a
local function, I guess it's not a big deal.

Toggle quote (2 lines)
> Also, as Mathieu wrote, please don’t use SET!.

No problem, but I don't recall seeing this message. Where did Mathieu
write this?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5OWMAACgkQm9z0l6S7
zH/6CwgAqHWwzvZQjyWiZyP2sDS6RmV/9PobVPxzQjsITMlfyqaymO0/1IJdiuE9
t8IqAWPg/l5fKqs46OlsNGMO1pn1E0by8ygAUcLDWI2euRrwp2Bzej27+3IKE6el
1MKrM06zCssL0qMTtHmXpoYBdNMfXhxFcXtefddpzPrU4EtrX1kX9yRRY/BcAbBZ
erLFcTttoqwe6nHwfq7oFxqTE9mweYOxap2r7ZpUWVwPCn9+3nALM5hZoBx3qVvl
JgMvq612ixdPy9IlzGNE+Ntdgt/1Zb8a5nX9BUp9ePfqm/EIefMps2XMEj+Ee+X+
yW8C+KiwTwpKHpEtEANtjC4AAPPZrQ==
=2fpl
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 20 Feb 2020 16:41
Re: [PATCH 1/4] build-system: Add copy-build-system.
87pne95krx.fsf@ambrevar.xyz
Should we add a mention in guix pull's "news"?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5OqJIACgkQm9z0l6S7
zH+bbgf9FIaGlgi+vGtBpCbVKJXZ5+zDKT7w1Z2C0+7xtK2ktweH0j0pka8zixHm
jzkuqvyhwqBeP6/fyRLf9YHaWeHCipT1L84D+LEgCpWzHBZYda/CmQIEWw0ZX1wp
3MZznalP0dJ54BOm3ZodbCDPIvOh/jqf2aOiblvqfw9YnwajY+ZNlHCRlfpG9yhH
vYd4FjfX0iKioCFWlT2NF6eylaPQNmAeY0/D43qu2tk7ZWKY2Ek25820hUa1gtgR
EA18X/li3WKTLHfpZLLMqWdQwva4F/Gd4xJV9iXrYo8Hx1NQErw3OF8I5AptuVOC
s57Eah7CGHZ/3rYNWgvVLnK+MDuzVQ==
=3KJQ
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 20 Feb 2020 18:09
Re: [bug#39599] [PATCH 1/4] build-system: Add copy-build-system.
2AB2B5D1-42B9-4DDF-A712-385BACF8BA60@lepiller.eu
Le 20 février 2020 10:41:06 GMT-05:00, Pierre Neidhardt <mail@ambrevar.xyz> a écrit :
Toggle quote (2 lines)
>Should we add a mention in guix pull's "news"?

It feels like this is an internal change that doesn't really affect end-user experience.
P
P
Pierre Neidhardt wrote on 20 Feb 2020 19:00
87sgj5t9zs.fsf@ambrevar.xyz
Fair enough.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5OyScACgkQm9z0l6S7
zH8jSwf/eL2cbKz2FENnm2BAh4jjOPe0KkeHjz6/j8SEerMkYU6THfFkrVovC337
17is+kfvdaA72jleXcJ+ngykjESvD4/+IFxxagSafXFaCvVFje6NFEdftVidMmBY
UdpPPMWjGDwUFv3UbEvwV2DD2yp6jnikdK2mdAKN8b206wnPJRyJkXPZb8p+UrjV
c2EArxaOwOYLmAgMgS4PgjB7FIq3GkG98b8KPmCy4m+mqKfU/uya7n1KzhJR8aSg
YcTEIQ53KitL7AS8mXJXeIj+W4VvcMIjTQ5ffNzQhIjibT+916/fTBt2Yskx98+s
OatJYxoFOTUbSqaO06YHXXC7c+E3Rg==
=C9NE
-----END PGP SIGNATURE-----

J
J
Jack Hill wrote on 21 Feb 2020 04:37
(address . 39599@debbugs.gnu.org)
20200221033733.11242-1-jackhill@jackhill.us
Alex,

On Thu, 20 Feb 2020, Alex Griffin wrote:

Toggle quote (2 lines)
> I packaged PaperWM using copy-build-system as an additional test case.

This is great! I learned about PaperWM from your patch, and I've been having
lots of fun with it.

Toggle quote (5 lines)
> + '(#:install-plan
> + '(("." "share/gnome-shell/extensions/paperwm@hedning:matrix.org"
> + #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
> + "\\.xml$" "\\.compiled$")))))

Seeing "compiled" here caught my attention. Since all we are doing so far is
copying files around, I expect everything to be in source form.

In this case the compiled file is a compiled glib schema. I've prepared a
second version of the patch that removes this file in a source snippet and
compiles it from the source in a new build phase.

This is another testament to the usefulness of the copy-build-system. It would
have been much more work to make the same modification to a package that uses
the trivial-build-system. Thanks Pierre!

Best,
Jack
J
J
Jack Hill wrote on 21 Feb 2020 04:37
(address . 39599@debbugs.gnu.org)
20200221033733.11242-2-jackhill@jackhill.us
* gnu/packages/gnome-xyz.scm (gnome-shell-extension-paperwm): New variable.

Co-authored-by: Alex Griffin <a@ajgrf.com>
---
gnu/packages/gnome-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 7f375fefc5..59913e0602 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -2,6 +2,8 @@
;;; Copyright © 2019 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +23,7 @@
(define-module (gnu packages gnome-xyz)
#:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system copy)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
@@ -304,6 +307,42 @@ It uses ES6 syntax and claims to be more actively maintained than others.")
(home-page "https://extensions.gnome.org/extension/2182/noannoyance/")
(license license:gpl2)))
+(define-public gnome-shell-extension-paperwm
+ (package
+ (name "gnome-shell-extension-paperwm")
+ (version "34.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/paperwm/PaperWM.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qry75f696pgmd9yzqvwhq5h6cipin2fvk7h881g29cjcpxim37a"))
+ (snippet
+ '(begin (delete-file "schemas/gschemas.compiled")))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("." "share/gnome-shell/extensions/paperwm@hedning:matrix.org"
+ #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
+ "\\.xml$" "\\.compiled$")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'compile-schemas
+ (lambda _
+ (with-directory-excursion "schemas"
+ (invoke "make")))))))
+ (native-inputs
+ `(("glib:bin" ,glib "bin"))) ; for glib-compile-schemas
+ (home-page "https://github.com/paperwm/PaperWM")
+ (synopsis "Tiled scrollable window management for GNOME Shell")
+ (description "PaperWM is an experimental GNOME Shell extension providing
+scrollable tiling of windows and per monitor workspaces. It's inspired by paper
+notebooks and tiling window managers.")
+ (license license:gpl3)))
+
(define-public numix-theme
(package
(name "numix-theme")
--
2.25.1
P
P
Pierre Neidhardt wrote on 21 Feb 2020 10:53
control message for bug #39599
(address . control@debbugs.gnu.org)
878skw5krl.fsf@ambrevar.xyz
close 39599
quit
P
P
Pierre Neidhardt wrote on 21 Feb 2020 10:53
Re: [bug#39599] [PATCH 1/4] build-system: Add copy-build-system.
875zg05kqw.fsf@ambrevar.xyz
Pushed!
Alex, I've included your patch.
Thanks to you all!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5PqLcACgkQm9z0l6S7
zH8kAwf/ZzGhDtGogmiqbkknMQQJ+DbNKNsW+VwYa++mckZPqV5qvPDsHMrlgKBe
NX7cOVeLFv2mPA5Bi8w1961D/48PQdSRWH5zQCZgnwocNoBtLPsJ6xnPSots0Zo4
C/PTQZK8e+8u54KPTIFNXsYZgUwqhNrrMH8/vHAps008mRcPKgM7duHjsY3+ygHD
Wt0Sd/GmukJfrdROxgtbojw9aptuIE/TZU0FXzsvm7A+K5g7ZnWoYg0z5nAMUMFK
xMS0EjuTU1FBagoaVKaPrP19l68PBeBspVjdRqEbNG/GTstpGOGzskwKvx9QDdNJ
2OS9fVF9s5msGAxZ5BBp3sP/bcYBmQ==
=YHUp
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 21 Feb 2020 11:43
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87pne8fcg9.fsf@nicolasgoaziou.fr
Hello,

Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (2 lines)
> Pushed!

Thank you for this useful addition!

I added a few fixes to the Texinfo part of your patch.

Moreover, the indentation is very odd there, compared to the rest of
"guix.texi". You may want to normalize it.

Regards,

--
Nicolas Goaziou
P
P
Pierre Neidhardt wrote on 21 Feb 2020 12:07
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
87tv3k42r6.fsf@ambrevar.xyz
Hi Nicolas!

Toggle quote (2 lines)
> I added a few fixes to the Texinfo part of your patch.

Thanks for those painful changes :D
Toggle quote (4 lines)
>
> Moreover, the indentation is very odd there, compared to the rest of
> "guix.texi". You may want to normalize it.

Oh, yes, I see that. I thought it would help with readability. How are
we supposed to visualize nested @itemize at the moment?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5Pug0ACgkQm9z0l6S7
zH/QuwgAq036VkWaV+LFkwuZduwSsDe5rWAe/1y5jf2zr/TqyFNUxFRraaxI/LqS
Tyu4EDm4g6KapVdBAo4t3yHnvzDokDdHFeMHPWfayVRzwj7/lP+G6cXglYfb1Bba
7L1408u7/vZxwaqTKRnbejYaW+MKv48/1/4+k4eJUM8JVPiNdvJ8PO0sGfJYx0yh
U3sciRatwo+T99qbG26+6CUNmRmPU3R3ZlKAG3GtAEKqTN8y8J0zkfxlu7HeKn2L
e6qxir/59ChcmWOvLtMozSnyCisThHTpRbTT4s/lvVigxxBOcy5lspDLbAk1T5ct
U1lSdMKOX3HKiEqGlHX26vt1NJVpdg==
=ooDN
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 21 Feb 2020 12:43
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87lfowf9nq.fsf@nicolasgoaziou.fr
Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (3 lines)
> Oh, yes, I see that. I thought it would help with readability. How are
> we supposed to visualize nested @itemize at the moment?

I don't think there's a clear answer, but, IMO, for readability sake, we
should not (ab)use nested lists in a manual.

There are three levels of such lists here. I think this is not
necessary. For example

Toggle snippet (7 lines)
@item When @var{source} matches a file or directory without trailing slash, install it to @var{target}.
@itemize
@item If @var{target} has a trailing slash, install @var{source} basename beneath @var{target}.
@item Otherwise install @var{source} as @var{target}.
@end itemize

could be written as, e.g.,

Toggle snippet (7 lines)
@item
When @var{source} matches a file or directory without a trailing slash,
install it to @var{target}. More accurately, if @var{target} ends with
a slash, install @var{source} basename beneath @var{target} directory.
Otherwise install @var{source} as @var{target}.

Similarly, instead of discussing about #:include and al. in a nested
list, this could happen in a subsequent paragraph, once "source" and
"target" are clarified, i.e., after "In all cases, the paths (BTW,
shouldn't it be "file names"?) relative to @var{source} are preserved
within @var{target}."

As a side note, are you sure about: "With @code{#:include}, install all
the files which (I would use "whose" here, but I'm not a native speaker)
path suffix (isn't it "basename" or, possibly better, "base name"
instead?) exactly matches one of the elements in the given list"? Do you
really mean that a file name matching two regexps is _not_ going to be
included?

Note that I know writing documentation is tedious; I don't want to sound
negative or boring.

Regards,
T
T
Tobias Geerinckx-Rice wrote on 21 Feb 2020 12:50
87ftf4xipf.fsf@nckx
Pierre,

Nicolas Goaziou ???
Toggle quote (4 lines)
> Moreover, the indentation is very odd there, compared to the
> rest of
> "guix.texi". You may want to normalize it.

More than just odd, unfortunately. It broke ‘guix pull’ on
master:
./guix.de.texi:6631: warning: @end should only appear at the
beginning of a line
./guix.de.texi:6635: warning: @itemize should only appear at the
beginning of a line
./guix.de.texi:6635: warning: @item should not appear in @itemize
./guix.de.texi:6635: @item outside of table or list
./guix.de.texi:6639: warning: @itemize should only appear at the
beginning of a line
./guix.de.texi:6639: warning: @item should not appear in @itemize
./guix.de.texi:6639: @item outside of table or list
./guix.de.texi:6647: warning: @end should only appear at the
beginning of a line
./guix.de.texi:6648: superfluous argument to @end itemize: In all
cases, the paths relative to @var{source} are>
Backtrace:
3 (primitive-load
"/gnu/store/qsd0khinmy748z6aq23ck8lcaxr?")
In ice-9/eval.scm:
619:8 2 (_ #f)
In ice-9/boot-9.scm:
260:13 1 (for-each #<procedure 7ffff4f4f2a0 at
ice-9/eval.scm:3?> ?)
In guix/build/utils.scm:
652:6 0 (invoke _ . _)

guix/build/utils.scm:652:6: In procedure invoke:
ERROR:
1. &invoke-error:
program:
"/gnu/store/irj21yhgls637jhhkb5yr79s76c96maq-texinfo-6.6/bin/makeinfo"
arguments: ("./guix.de.texi" "-I"
"/gnu/store/ygairf8pckyzl1aplf0jxmbzr9gnhjik-doc" "-I" "."
"-o" "/gnu/st>
exit-status: 1
term-signal: #f
stop-signal: #f
I removed *all* leading whitespace in
af51d01a8aa8d7cf529173bdb64392f14eb21962 and this fixes the
problem. In future, avoid it altogether. It clashes with the
rest of the file even when it doesn't break anything.

If you're using some kind of fancy-texinfo-mode please disable it,
although I wonder who writes a mode that breaks things so badly
:-p

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl5PxAwACgkQ2Imw8BjF
STwbCg/+L7J6nXpDlP8iCsf3e2KPZaJODMhI1BVb2dvv0WqceBkpT0G3iHzq783o
cN+QNRxw17MnGmhb44An1dH7lg4X2XcVyIDfUnVSiiuY0AcH8YO3647H/Q8cYeeR
t/fNDoRiZdqQAoEoBp+WYZ9WNYCgkrdYImWk5vIPJESNPiBAGygpgc1g4le+5SQu
YipsOGfwRPYPdbE3OJUmvSrcQZ0RIjxMim3ZhLS1WlX4oub3NK7CHjzS+rYqW3g6
W+uyqIY5yitrr/rNT9DbRJ723nqS7cLUE7eqMEXL3uRETWyfCwW3t7XL8Zc7ZJX1
IJV+WPLHp+RykIWtG0SvU1HO5QMf7NY9FFLqWTGYvSEuqikbvYQ5ySNISsxNrAJu
CnXPbtHOEdOMAZoSQL5+ttEGyzxb3dkvyvFqcXPayXmNth878aHCK4MmGyNvaFcF
X96ZppHP1JeP5VNlRKOVVh3dwxtkNMgvogek5OwjWZEO7/kypQr9FgXXhBC0J7F9
hiVAEY07Vuq5HLaJdpA2d5ZKki1kf6kGq/aGW/0S7DNUWmuD0kZM0l43rCWCm2mK
qVocoKCp4vevbnLKPIkq8GpGKaP0tfQNvPIMtiLkI4TlDOWLyqRLhEeZsnz7m3T2
yCx7nUc2Ye2xO1A8nQPHwqyvtG7VtLbs3Z7umPvP8l7pD5WR5L8=
=h1Xz
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 21 Feb 2020 13:04
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
87o8ts405c.fsf@ambrevar.xyz
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (29 lines)
> Pierre Neidhardt <mail@ambrevar.xyz> writes:
>
>> Oh, yes, I see that. I thought it would help with readability. How are
>> we supposed to visualize nested @itemize at the moment?
>
> I don't think there's a clear answer, but, IMO, for readability sake, we
> should not (ab)use nested lists in a manual.
>
> There are three levels of such lists here. I think this is not
> necessary. For example
>
> --8<---------------cut here---------------start------------->8---
> @item When @var{source} matches a file or directory without trailing slash, install it to @var{target}.
> @itemize
> @item If @var{target} has a trailing slash, install @var{source} basename beneath @var{target}.
> @item Otherwise install @var{source} as @var{target}.
> @end itemize
> --8<---------------cut here---------------end--------------->8---
>
> could be written as, e.g.,
>
> --8<---------------cut here---------------start------------->8---
> @item
> When @var{source} matches a file or directory without a trailing slash,
> install it to @var{target}. More accurately, if @var{target} ends with
> a slash, install @var{source} basename beneath @var{target} directory.
> Otherwise install @var{source} as @var{target}.
> --8<---------------cut here---------------end--------------->8---

Fair enough.
The idea behind the items was to structure it like a spec that would
easily translate to code then.
(I wrote these specs before writing the code.)

Toggle quote (5 lines)
> Similarly, instead of discussing about #:include and al. in a nested
> list, this could happen in a subsequent paragraph, once "source" and
> "target" are clarified, i.e., after "In all cases, the paths (BTW,
> shouldn't it be "file names"?)

I don't know. In my opinion, "file names" is often interpreted as "base
names". Here I mean that the full subpath of the file is preserved.
May I should use "subpath" then.

Toggle quote (4 lines)
> As a side note, are you sure about: "With @code{#:include}, install all
> the files which (I would use "whose" here, but I'm not a native
> speaker)


Actually, should be "which the" or "the files the path of which".
But all this is very pedantic :)

Toggle quote (3 lines)
> path suffix (isn't it "basename" or, possibly better, "base name"
> instead?)

No, it really is "path suffix" here because it matches against the
parent directories, e.g. "foo/bar" is a valid suffix.

Toggle quote (4 lines)
> exactly matches one of the elements in the given list"? Do you
> really mean that a file name matching two regexps is _not_ going to be
> included?

Indeed, that's a mistake! Thanks!.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5Pxz8ACgkQm9z0l6S7
zH/0bgf+K8N7yGqE9u0i2HFqt0euxZegLyYywuisLGPsBcYpVwDvviH7NYwGEqFY
ieKixuV1AIe3L+JgI3hoOh6OEJUwIJRAPKoezS/Nn8SNpndeZbVVfwH5v+OSyuj4
bHsEtJOp9q7lOCGKWT9x+eNpe0Q/neqSvZf6dIzhA6OoksbGwxb6BEqB2K48J9Yv
YQNErfkJuP6WPb/dy2pNP3OPd0At/2G0diwzVRfvZUkFuCZe3lNh1/VtnB+wAlIq
DoiLBHf+a9SB3xAM7ydMiXo54cgpr7cBBli/B7+Dd1zMMggs6PeCy9yJa1udTaHK
Rd+xvbhXxoHGrSO6cED9plW9eY+j+Q==
=nLYz
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 21 Feb 2020 13:06
87lfow4022.fsf@ambrevar.xyz
Tobias Geerinckx-Rice <me@tobias.gr> writes:

Toggle quote (5 lines)
> I removed *all* leading whitespace in
> af51d01a8aa8d7cf529173bdb64392f14eb21962 and this fixes the
> problem. In future, avoid it altogether. It clashes with the
> rest of the file even when it doesn't break anything.

Thanks for the fix.

Toggle quote (4 lines)
> If you're using some kind of fancy-texinfo-mode please disable it,
> although I wonder who writes a mode that breaks things so badly
> :-p

I don't, I just indented manually. It was impossible to read otherwise.
Well, Texinfo is a bit tedious, I guess we have to leave with it.

Crazy that "guix pull" broke and not "make". I wonder why "guix pull"
is so sensitive.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5Px7UACgkQm9z0l6S7
zH9oWQf+Ock/F1v80U3qZss+p5ElIPxIBRzm9NhTAjbiRGTkcRE5qBu0+BAsdNaI
l67eQiyv/v10iHGNjmthvnn5xqyGL89VwaoojaMsjxdJyIgDhRRO7Yq0j0jBb23n
3nZIBPISKym0bsLmKwodwux7RiPl9Wa4AT7pVheE6bYg5U5A/O3nXjU5+0RbKf75
SfYYg7+7t/YuDVFnp+FK4IEsAXyG240ZdOFchCS5NqjoZkPn7HvZJuTIKZhTkURq
gujEXKL2mhfnP72BuAbyMl/h3cWXKFNmKj39qWHBwh06CAEFZkh10kcJXr9Ujm0I
VQP9R8Z2wwMEozcJOBuYowlOdwqQag==
=CiY4
-----END PGP SIGNATURE-----

A
A
Alex Griffin wrote on 21 Feb 2020 15:34
Re: [PATCH v2] gnu: Add gnome-shell-extension-paperwm.
1628381b-06af-4e2e-acd0-1f23238b361c@www.fastmail.com
Jack,

Thank you, I just committed your improvements with some slight modifications!

I had noticed the issue and intended to fix it myself, but after stepping away from my computer for a while, I must have forgotten about it and sent my patch too early.

--
Alex Griffin
J
J
Jack Hill wrote on 21 Feb 2020 17:22
(name . Alex Griffin)(address . a@ajgrf.com)(address . 39599@debbugs.gnu.org)
alpine.DEB.2.20.2002211115470.19733@marsh.hcoop.net
Alex,

On Fri, 21 Feb 2020, Alex Griffin wrote:

Toggle quote (3 lines)
> Thank you, I just committed your improvements with some slight
> modifications!

Thanks for the improvements. However, I don't think this change was
warranted:

- #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
- "\\.xml$" "\\.compiled$")))))
+ #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$" "\\.xml$")))

I think we still want to install the gschemas.compiled file that build in
the new compile-schemas phase.

Toggle quote (4 lines)
> I had noticed the issue and intended to fix it myself, but after
> stepping away from my computer for a while, I must have forgotten about
> it and sent my patch too early.

No worries, I'm happy to serve as a second set of eyes.

Best,
Jack
A
A
Alex Griffin wrote on 21 Feb 2020 19:48
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 39599@debbugs.gnu.org)
7d81cd34-b527-44da-872c-700362894d9b@www.fastmail.com
On Fri, Feb 21, 2020, at 4:22 PM, Jack Hill wrote:
Toggle quote (11 lines)
> Thanks for the improvements. However, I don't think this change was
> warranted:
>
> - #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
> - "\\.xml$" "\\.compiled$")))))
> + #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
> "\\.xml$")))
>
> I think we still want to install the gschemas.compiled file that build in
> the new compile-schemas phase.

You're right of course. I just committed the fix.

--
Alex Griffin
J
J
Jack Hill wrote on 21 Feb 2020 19:51
(name . Alex Griffin)(address . a@ajgrf.com)(address . 39599@debbugs.gnu.org)
alpine.DEB.2.20.2002211351280.19733@marsh.hcoop.net
On Fri, 21 Feb 2020, Alex Griffin wrote:

Toggle quote (14 lines)
> On Fri, Feb 21, 2020, at 4:22 PM, Jack Hill wrote:
>> Thanks for the improvements. However, I don't think this change was
>> warranted:
>>
>> - #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
>> - "\\.xml$" "\\.compiled$")))))
>> + #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
>> "\\.xml$")))
>>
>> I think we still want to install the gschemas.compiled file that build in
>> the new compile-schemas phase.
>
> You're right of course. I just committed the fix.

Awesome, thanks!
?