* [bug#66500] [PATCH core-updates 0/3] Custom output labels for copy-build-system.
@ 2023-10-12 15:27 Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-12 15:27 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
This patch-series implements a `#:output' parameter for the rules within
a install-plan used by the copy-build-system which can be used to
selectively install some files into different outputs.
For demonstration purposes the docbook-dsssl package was refactored to
make use of this new feature, with a bonus patch that fixes an
inconsistency in the same package that was caught while testing.
Bruno Victal (3):
build: copy-build-system: Allow specifying different output labels.
gnu: docbook-dsssl: Refactor install-plan.
gnu: docbook-dsssl: Fix script installation path.
doc/guix.texi | 6 ++++++
gnu/packages/docbook.scm | 31 ++++++++++++++-----------------
guix/build/copy-build-system.scm | 18 +++++++++++++-----
3 files changed, 33 insertions(+), 22 deletions(-)
base-commit: 651265562bf6fea52c49596f9fb8ec380e5f0022
--
2.41.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels.
2023-10-12 15:27 [bug#66500] [PATCH core-updates 0/3] Custom output labels for copy-build-system Bruno Victal
@ 2023-10-12 15:30 ` Bruno Victal
2023-10-19 9:46 ` Liliana Marie Prikler
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Bruno Victal @ 2023-10-12 15:30 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
* guix/build/copy-build-system.scm: Introduce '#:output' parameter to specify
which output label to use for a given rule.
* doc/guix.texi (Build Systems): Document it.
---
doc/guix.texi | 6 ++++++
guix/build/copy-build-system.scm | 18 +++++++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 4afe1af6c0..8e627912a0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9460,6 +9460,9 @@ Build Systems
If both inclusions and exclusions are specified, the exclusions are done
on top of the inclusions.
@end itemize
+@item When a package has multiple outputs the @code{#:output} argument
+can be used to specify which output label the files should be installed
+to.
@end itemize
In all cases, the paths relative to @var{source} are preserved within
@var{target}.
@@ -9476,6 +9479,9 @@ Build Systems
@file{share/my-app/sub/file}.
@item @code{("foo/sub" "share/my-app" #:include ("file"))}: Install @file{foo/sub/file} to
@file{share/my-app/file}.
+@item @code{("foo/doc" "share/my-app/doc" #:output "doc")}: Install
+@file{"foo/doc"} to @file{"share/my-app/doc"} for output labelled
+@code{"doc"}.
@end itemize
@end defvar
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index fb2d1db056..152cf88224 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,9 +41,9 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
An install plan is a list of plans in the form:
- (SOURCE TARGET [FILTERS])
+ (SOURCE TARGET [FILTERS] [#:output OUTPUT])
-In the above, FILTERS are optional.
+In the above, FILTERS and OUTPUT are optional.
- When SOURCE matches a file or directory without trailing slash, install it to
TARGET.
@@ -63,6 +64,9 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
If both `#:include*` and `#:exclude*` are specified, the exclusion is done
on the inclusion list.
+- When a package has multiple outputs the `#:output` argument can be used
+to specify which output label the files should be installed to.
+
Examples:
- `(\"foo/bar\" \"share/my-app/\")`: Install bar to \"share/my-app/bar\".
@@ -72,7 +76,9 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
- `(\"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\"."
+\"share/my-app/file\".
+- `(\"foo/doc\" \"share/my-app/doc\" #:output \"doc\")`: Install \"foo/doc\" to
+\"share/my-app/doc\" for output labelled \"doc\"."
(define (install-simple source target)
"Install SOURCE to TARGET.
TARGET must point to a store location.
@@ -133,8 +139,10 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
(string-append target "/")))
file-list))))
- (define* (install source target #:key include exclude include-regexp exclude-regexp)
- (let ((final-target (string-append (assoc-ref outputs "out") "/" target))
+ (define* (install source target
+ #:key include exclude include-regexp exclude-regexp
+ (output "out"))
+ (let ((final-target (string-append (assoc-ref outputs output) "/" target))
(filters? (or include exclude include-regexp exclude-regexp)))
(when (and (not (file-is-directory? source))
filters?)
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan.
2023-10-12 15:27 [bug#66500] [PATCH core-updates 0/3] Custom output labels for copy-build-system Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
@ 2023-10-12 15:30 ` Bruno Victal
2023-10-19 9:47 ` Liliana Marie Prikler
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 3/3] gnu: docbook-dsssl: Fix script installation path Bruno Victal
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
3 siblings, 1 reply; 13+ messages in thread
From: Bruno Victal @ 2023-10-12 15:30 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
Replace custom phase with copy-build-system newly added #:output parameter.
Additionally remove extra slashes from license URIs and obsolete inputs.
* gnu/packages/docbook.scm (docbook-dsssl)[source]: Remove empty directories
from source using a snippet.
[arguments]<#:phases>: Relocate 'install-doc logic into …
<#:install-plan>: … here. Remove obsolete exclusion rules.
[native-inputs]: Remove bzip2 and tar since these are already available by
default.
[license]: Remove extraneous slash.
(docbook-dsssl-doc)[license]: Remove extraneous slash.
---
gnu/packages/docbook.scm | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index f7dff53808..07cb06059a 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -513,31 +513,25 @@ (define-public docbook-dsssl
name "-" version ".tar.bz2"))
(sha256
(base32
- "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))))
+ "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))
+ (snippet
+ #~(begin
+ ;; Remove empty directories.
+ (rmdir "doc")
+ (rmdir "docsrc")))))
(build-system copy-build-system)
(outputs '("out" "doc"))
(arguments
(list
#:install-plan
- #~`(("./" "sgml/dtd/docbook/"
- #:exclude ("doc" "docsrc")))
- #:phases
- #~(modify-phases %standard-phases
- ;; The doc output contains 1.4 MiB of HTML documentation.
- (add-after 'install 'install-doc
- (lambda* (#:key inputs #:allow-other-keys)
- (mkdir-p (string-append #$output:doc "/share/doc"))
- (symlink (assoc-ref inputs "docbook-dsssl-doc")
- (format #f "~a/share/doc/~a-~a"
- #$output:doc #$name #$version)))))))
+ #~`(("./" "sgml/dtd/docbook/")
+ (#$(this-package-input "docbook-dsssl-doc") "./" #:output "doc"))))
(inputs
(list docbook-dsssl-doc))
- (native-inputs
- (list bzip2 tar))
(home-page "https://docbook.org/")
(synopsis "DSSSL style sheets for DocBook")
(description "This package provides DSSSL style sheets for DocBook.")
- (license (license:non-copyleft "file://README"))))
+ (license (license:non-copyleft "file:/README"))))
;;; Private variable, used as the 'doc' output of the docbook-dsssl package.
(define docbook-dsssl-doc
@@ -560,7 +554,7 @@ (define docbook-dsssl-doc
(home-page "https://docbook.org/")
(synopsis "DocBook DSSSL style sheets documentation")
(description "Documentation for the DocBook DSSSL style sheets.")
- (license (license:non-copyleft "file://doc/LEGALNOTICE.htm"))))
+ (license (license:non-copyleft "file:/doc/LEGALNOTICE.htm"))))
(define-public docbook-sgml-4.2
(package
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 3/3] gnu: docbook-dsssl: Fix script installation path.
2023-10-12 15:27 [bug#66500] [PATCH core-updates 0/3] Custom output labels for copy-build-system Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
@ 2023-10-12 15:30 ` Bruno Victal
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
3 siblings, 0 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-12 15:30 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
* gnu/packages/docbook.scm (docbook-dsssl)[source]: Fix script permission.
[arguments]<#:install-plan>: Install script and manpage correctly.
[inputs]: Add perl.
---
gnu/packages/docbook.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 07cb06059a..9445c86157 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -516,6 +516,7 @@ (define-public docbook-dsssl
"1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))
(snippet
#~(begin
+ (chmod "bin/collateindex.pl" #o755)
;; Remove empty directories.
(rmdir "doc")
(rmdir "docsrc")))))
@@ -524,10 +525,12 @@ (define-public docbook-dsssl
(arguments
(list
#:install-plan
- #~`(("./" "sgml/dtd/docbook/")
+ #~`(("./" "sgml/dtd/docbook/" #:exclude ("bin"))
+ ("bin/collateindex.pl" "bin/")
+ ("bin/collateindex.pl.1" "share/man/man1/")
(#$(this-package-input "docbook-dsssl-doc") "./" #:output "doc"))))
(inputs
- (list docbook-dsssl-doc))
+ (list perl docbook-dsssl-doc))
(home-page "https://docbook.org/")
(synopsis "DSSSL style sheets for DocBook")
(description "This package provides DSSSL style sheets for DocBook.")
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels.
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
@ 2023-10-19 9:46 ` Liliana Marie Prikler
2023-10-19 15:36 ` Bruno Victal
0 siblings, 1 reply; 13+ messages in thread
From: Liliana Marie Prikler @ 2023-10-19 9:46 UTC (permalink / raw)
To: Bruno Victal, 66500
Hi Bruno,
Am Donnerstag, dem 12.10.2023 um 16:30 +0100 schrieb Bruno Victal:
> [...]
> +@item When a package has multiple outputs the @code{#:output}
> argument
> +can be used to specify which output label the files should be
> installed
> +to.
This is perhaps extremely nitpicky, but there should be a comma before
"the @code{#:output} argument".
> @@ -63,6 +64,9 @@ (define* (install #:key install-plan outputs
> #:allow-other-keys)
> If both `#:include*` and `#:exclude*` are specified, the
> exclusion is done
> on the inclusion list.
>
> +- When a package has multiple outputs the `#:output` argument can be
> used
> +to specify which output label the files should be installed to.
> +
Same here.
> Examples:
>
> - `(\"foo/bar\" \"share/my-app/\")`: Install bar to \"share/my-
> app/bar\".
> @@ -72,7 +76,9 @@ (define* (install #:key install-plan outputs
> #:allow-other-keys)
> - `(\"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\"."
> +\"share/my-app/file\".
> +- `(\"foo/doc\" \"share/my-app/doc\" #:output \"doc\")`: Install
> \"foo/doc\" to
> +\"share/my-app/doc\" for output labelled \"doc\"."
s/for output labelled/within the output named/
or
s/for output labelled \"doc\"/within the \"doc\" output/
> (define (install-simple source target)
> "Install SOURCE to TARGET.
> TARGET must point to a store location.
> @@ -133,8 +139,10 @@ (define* (install #:key install-plan outputs
> #:allow-other-keys)
> (string-append target "/")))
> file-list))))
>
> - (define* (install source target #:key include exclude include-
> regexp exclude-regexp)
> - (let ((final-target (string-append (assoc-ref outputs "out") "/"
> target))
> + (define* (install source target
> + #:key include exclude include-regexp exclude-
> regexp
> + (output "out"))
> + (let ((final-target (string-append (assoc-ref outputs output)
> "/" target))
> (filters? (or include exclude include-regexp exclude-
> regexp)))
> (when (and (not (file-is-directory? source))
> filters?)
Otherwise LGTM. Note, however, that CI doesn't like this series.
Cheers
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan.
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
@ 2023-10-19 9:47 ` Liliana Marie Prikler
2023-10-19 15:25 ` Bruno Victal
0 siblings, 1 reply; 13+ messages in thread
From: Liliana Marie Prikler @ 2023-10-19 9:47 UTC (permalink / raw)
To: Bruno Victal, 66500
Am Donnerstag, dem 12.10.2023 um 16:30 +0100 schrieb Bruno Victal:
> Replace custom phase with copy-build-system newly added #:output
> parameter.
> Additionally remove extra slashes from license URIs and obsolete
> inputs.
>
> * gnu/packages/docbook.scm (docbook-dsssl)[source]: Remove empty
> directories from source using a snippet.
> [arguments]<#:phases>: Relocate 'install-doc logic into …
> <#:install-plan>: … here. Remove obsolete exclusion rules.
> [native-inputs]: Remove bzip2 and tar since these are already
> available by default.
> [license]: Remove extraneous slash.
> (docbook-dsssl-doc)[license]: Remove extraneous slash.
> ---
Are these extraneous slash removals really improving anything? I
personally type file URIs with three slashes, but that's outside the
Guix context.
Cheers
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan.
2023-10-19 9:47 ` Liliana Marie Prikler
@ 2023-10-19 15:25 ` Bruno Victal
0 siblings, 0 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-19 15:25 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 66500
On 2023-10-19 10:47, Liliana Marie Prikler wrote:
> Are these extraneous slash removals really improving anything? I
> personally type file URIs with three slashes, but that's outside the
> Guix context.
It's mostly semantical improvements as I've explained in the
(unrelated) 1d07acb5f440cb3205b2336a213163ca4584d4f6 commit message [1].
Save for applications with broken or outdated URI handling (which would
be a bug), the single slash URIs work just the same as before.
[1]: <https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=1d07acb5f440cb3205b2336a213163ca4584d4f6>
--
Furthermore, I consider that nonfree software must be eradicated.
Cheers,
Bruno.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels.
2023-10-19 9:46 ` Liliana Marie Prikler
@ 2023-10-19 15:36 ` Bruno Victal
0 siblings, 0 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-19 15:36 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 66500
Hi Liliana,
On 2023-10-19 10:46, Liliana Marie Prikler wrote:
> This is perhaps extremely nitpicky, but there should be a comma before
> "the @code{#:output} argument".
Addressing this with v2.
> s/for output labelled/within the output named/
> or
> s/for output labelled \"doc\"/within the \"doc\" output/
Likewise, went for the second choice here.
> Otherwise LGTM. Note, however, that CI doesn't like this series.
Strange, the CI complains of a merge conflict yet I didn't encounter
any issues when rebasing this to the latest core-updates [1].
[1]: guix commit d59653b7c9e43ebdbba20e2ca071429507f94c67
--
Furthermore, I consider that nonfree software must be eradicated.
Cheers,
Bruno.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system.
2023-10-12 15:27 [bug#66500] [PATCH core-updates 0/3] Custom output labels for copy-build-system Bruno Victal
` (2 preceding siblings ...)
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 3/3] gnu: docbook-dsssl: Fix script installation path Bruno Victal
@ 2023-10-19 15:37 ` Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
` (3 more replies)
3 siblings, 4 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-19 15:37 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal, Liliana Marie Prikler
Notable changes since v1:
* Address documentation feedback.
* Rebased to solve potential merge conflicts.
Bruno Victal (3):
build: copy-build-system: Allow specifying different output labels.
gnu: docbook-dsssl: Refactor install-plan.
gnu: docbook-dsssl: Fix script installation path.
doc/guix.texi | 6 ++++++
gnu/packages/docbook.scm | 31 ++++++++++++++-----------------
guix/build/copy-build-system.scm | 18 +++++++++++++-----
3 files changed, 33 insertions(+), 22 deletions(-)
base-commit: d59653b7c9e43ebdbba20e2ca071429507f94c67
--
2.41.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates v2 1/3] build: copy-build-system: Allow specifying different output labels.
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
@ 2023-10-19 15:38 ` Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-19 15:38 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
* guix/build/copy-build-system.scm: Introduce '#:output' parameter to specify
which output label to use for a given rule.
* doc/guix.texi (Build Systems): Document it.
---
doc/guix.texi | 6 ++++++
guix/build/copy-build-system.scm | 18 +++++++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 4afe1af6c0..4f6c4ce67a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9460,6 +9460,9 @@ Build Systems
If both inclusions and exclusions are specified, the exclusions are done
on top of the inclusions.
@end itemize
+@item When a package has multiple outputs, the @code{#:output} argument
+can be used to specify which output label the files should be installed
+to.
@end itemize
In all cases, the paths relative to @var{source} are preserved within
@var{target}.
@@ -9476,6 +9479,9 @@ Build Systems
@file{share/my-app/sub/file}.
@item @code{("foo/sub" "share/my-app" #:include ("file"))}: Install @file{foo/sub/file} to
@file{share/my-app/file}.
+@item @code{("foo/doc" "share/my-app/doc" #:output "doc")}: Install
+@file{"foo/doc"} to @file{"share/my-app/doc"} within the @code{"doc"}
+output.
@end itemize
@end defvar
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index fb2d1db056..25d3f4c57a 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,9 +41,9 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
An install plan is a list of plans in the form:
- (SOURCE TARGET [FILTERS])
+ (SOURCE TARGET [FILTERS] [#:output OUTPUT])
-In the above, FILTERS are optional.
+In the above, FILTERS and OUTPUT are optional.
- When SOURCE matches a file or directory without trailing slash, install it to
TARGET.
@@ -63,6 +64,9 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
If both `#:include*` and `#:exclude*` are specified, the exclusion is done
on the inclusion list.
+- When a package has multiple outputs, the `#:output` argument can be used
+to specify which output label the files should be installed to.
+
Examples:
- `(\"foo/bar\" \"share/my-app/\")`: Install bar to \"share/my-app/bar\".
@@ -72,7 +76,9 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
- `(\"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\"."
+\"share/my-app/file\".
+- `(\"foo/doc\" \"share/my-app/doc\" #:output \"doc\")`: Install \"foo/doc\" to
+\"share/my-app/doc\" within the \"doc\" output."
(define (install-simple source target)
"Install SOURCE to TARGET.
TARGET must point to a store location.
@@ -133,8 +139,10 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
(string-append target "/")))
file-list))))
- (define* (install source target #:key include exclude include-regexp exclude-regexp)
- (let ((final-target (string-append (assoc-ref outputs "out") "/" target))
+ (define* (install source target
+ #:key include exclude include-regexp exclude-regexp
+ (output "out"))
+ (let ((final-target (string-append (assoc-ref outputs output) "/" target))
(filters? (or include exclude include-regexp exclude-regexp)))
(when (and (not (file-is-directory? source))
filters?)
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates v2 2/3] gnu: docbook-dsssl: Refactor install-plan.
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
@ 2023-10-19 15:38 ` Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 3/3] gnu: docbook-dsssl: Fix script installation path Bruno Victal
2023-12-20 21:10 ` bug#66500: [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Ludovic Courtès
3 siblings, 0 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-19 15:38 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
Replace custom phase with copy-build-system newly added #:output parameter.
Additionally remove extra slashes from license URIs and obsolete inputs.
* gnu/packages/docbook.scm (docbook-dsssl)[source]: Remove empty directories
from source using a snippet.
[arguments]<#:phases>: Relocate 'install-doc logic into …
<#:install-plan>: … here. Remove obsolete exclusion rules.
[native-inputs]: Remove bzip2 and tar since these are already available by
default.
[license]: Remove extraneous slash.
(docbook-dsssl-doc)[license]: Remove extraneous slash.
---
gnu/packages/docbook.scm | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index f7dff53808..07cb06059a 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -513,31 +513,25 @@ (define-public docbook-dsssl
name "-" version ".tar.bz2"))
(sha256
(base32
- "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))))
+ "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))
+ (snippet
+ #~(begin
+ ;; Remove empty directories.
+ (rmdir "doc")
+ (rmdir "docsrc")))))
(build-system copy-build-system)
(outputs '("out" "doc"))
(arguments
(list
#:install-plan
- #~`(("./" "sgml/dtd/docbook/"
- #:exclude ("doc" "docsrc")))
- #:phases
- #~(modify-phases %standard-phases
- ;; The doc output contains 1.4 MiB of HTML documentation.
- (add-after 'install 'install-doc
- (lambda* (#:key inputs #:allow-other-keys)
- (mkdir-p (string-append #$output:doc "/share/doc"))
- (symlink (assoc-ref inputs "docbook-dsssl-doc")
- (format #f "~a/share/doc/~a-~a"
- #$output:doc #$name #$version)))))))
+ #~`(("./" "sgml/dtd/docbook/")
+ (#$(this-package-input "docbook-dsssl-doc") "./" #:output "doc"))))
(inputs
(list docbook-dsssl-doc))
- (native-inputs
- (list bzip2 tar))
(home-page "https://docbook.org/")
(synopsis "DSSSL style sheets for DocBook")
(description "This package provides DSSSL style sheets for DocBook.")
- (license (license:non-copyleft "file://README"))))
+ (license (license:non-copyleft "file:/README"))))
;;; Private variable, used as the 'doc' output of the docbook-dsssl package.
(define docbook-dsssl-doc
@@ -560,7 +554,7 @@ (define docbook-dsssl-doc
(home-page "https://docbook.org/")
(synopsis "DocBook DSSSL style sheets documentation")
(description "Documentation for the DocBook DSSSL style sheets.")
- (license (license:non-copyleft "file://doc/LEGALNOTICE.htm"))))
+ (license (license:non-copyleft "file:/doc/LEGALNOTICE.htm"))))
(define-public docbook-sgml-4.2
(package
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#66500] [PATCH core-updates v2 3/3] gnu: docbook-dsssl: Fix script installation path.
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
@ 2023-10-19 15:38 ` Bruno Victal
2023-12-20 21:10 ` bug#66500: [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Ludovic Courtès
3 siblings, 0 replies; 13+ messages in thread
From: Bruno Victal @ 2023-10-19 15:38 UTC (permalink / raw)
To: 66500; +Cc: Bruno Victal
* gnu/packages/docbook.scm (docbook-dsssl)[source]: Fix script permission.
[arguments]<#:install-plan>: Install script and manpage correctly.
[inputs]: Add perl.
---
gnu/packages/docbook.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 07cb06059a..9445c86157 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -516,6 +516,7 @@ (define-public docbook-dsssl
"1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig"))
(snippet
#~(begin
+ (chmod "bin/collateindex.pl" #o755)
;; Remove empty directories.
(rmdir "doc")
(rmdir "docsrc")))))
@@ -524,10 +525,12 @@ (define-public docbook-dsssl
(arguments
(list
#:install-plan
- #~`(("./" "sgml/dtd/docbook/")
+ #~`(("./" "sgml/dtd/docbook/" #:exclude ("bin"))
+ ("bin/collateindex.pl" "bin/")
+ ("bin/collateindex.pl.1" "share/man/man1/")
(#$(this-package-input "docbook-dsssl-doc") "./" #:output "doc"))))
(inputs
- (list docbook-dsssl-doc))
+ (list perl docbook-dsssl-doc))
(home-page "https://docbook.org/")
(synopsis "DSSSL style sheets for DocBook")
(description "This package provides DSSSL style sheets for DocBook.")
--
2.41.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* bug#66500: [PATCH core-updates v2 0/3] Custom output labels for copy-build-system.
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
` (2 preceding siblings ...)
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 3/3] gnu: docbook-dsssl: Fix script installation path Bruno Victal
@ 2023-12-20 21:10 ` Ludovic Courtès
3 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2023-12-20 21:10 UTC (permalink / raw)
To: Bruno Victal; +Cc: Liliana Marie Prikler, 66500-done
Hi Bruno,
Bruno Victal <mirai@makinata.eu> skribis:
> build: copy-build-system: Allow specifying different output labels.
> gnu: docbook-dsssl: Refactor install-plan.
> gnu: docbook-dsssl: Fix script installation path.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-12-20 21:11 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 15:27 [bug#66500] [PATCH core-updates 0/3] Custom output labels for copy-build-system Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
2023-10-19 9:46 ` Liliana Marie Prikler
2023-10-19 15:36 ` Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
2023-10-19 9:47 ` Liliana Marie Prikler
2023-10-19 15:25 ` Bruno Victal
2023-10-12 15:30 ` [bug#66500] [PATCH core-updates 3/3] gnu: docbook-dsssl: Fix script installation path Bruno Victal
2023-10-19 15:37 ` [bug#66500] [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 1/3] build: copy-build-system: Allow specifying different output labels Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 2/3] gnu: docbook-dsssl: Refactor install-plan Bruno Victal
2023-10-19 15:38 ` [bug#66500] [PATCH core-updates v2 3/3] gnu: docbook-dsssl: Fix script installation path Bruno Victal
2023-12-20 21:10 ` bug#66500: [PATCH core-updates v2 0/3] Custom output labels for copy-build-system Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.