[PATCH] gnu: i3-wm: Add missing propagated inputs.

  • Open
  • quality assurance status badge
Details
2 participants
  • 宋文武
  • SeerLite
Owner
unassigned
Submitted by
SeerLite
Severity
normal
S
S
SeerLite wrote on 5 Mar 07:28 +0100
(address . guix-patches@gnu.org)(name . SeerLite)(address . seerlite@disroot.org)
20230305062848.13101-1-seerlite@disroot.org
perl-anyevent-i3 is necessary to run i3-save-tree.

* gnu/packages/wm.scm (i3-wm)[propagated-inputs]: Add perl and perl-anyevent-i3.
---
gnu/packages/wm.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 5b8dbd5c70..8816f110bb 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -356,6 +356,8 @@ (define-public i3-wm
startup-notification
pango
cairo))
+ (propagated-inputs
+ (list perl perl-anyevent-i3))
(native-inputs
(list which
perl
--
2.39.1
宋文武 wrote on 6 Mar 09:30 +0100
(name . SeerLite)(address . seerlite@disroot.org)(address . 61975@debbugs.gnu.org)
87sfeip9ic.fsf@envs.net
SeerLite <seerlite@disroot.org> writes:

Toggle quote (18 lines)
> perl-anyevent-i3 is necessary to run i3-save-tree.
>
> * gnu/packages/wm.scm (i3-wm)[propagated-inputs]: Add perl and perl-anyevent-i3.
> ---
> gnu/packages/wm.scm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 5b8dbd5c70..8816f110bb 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -356,6 +356,8 @@ (define-public i3-wm
> startup-notification
> pango
> cairo))
> + (propagated-inputs
> + (list perl perl-anyevent-i3))

Hello, this can also be done by 'wrap-program' i3-save-tree with
PERL5LIB. And a wrapper is considered better than propagated-input here
due to the latter will introduce perl and its libraries into user's
profile, which may not be what a typical i3 user want and will also
increase the chance of conflicts in profile.

Could you send an update patch to use 'wrap-program' for i3-save-tree?
Thank you!
S
S
SeerLite wrote on 7 Mar 04:44 +0100
[PATCH v2 1/2] gnu: i3-wm: Use new package style.
(address . 61975@debbugs.gnu.org)(name . SeerLite)(address . seerlite@disroot.org)
20230307034458.21736-1-seerlite@disroot.org
* gnu/packages/wm.scm (i3-wm)[arguments]: Use gexps.
---
gnu/packages/wm.scm | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 5b8dbd5c70..3bdbc43c51 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -325,20 +325,19 @@ (define-public i3-wm
"0jrya4rhh46sivlmqaqc4n9abpp1yn1ajhi616gn75cxwl8rjqr8"))))
(build-system meson-build-system)
(arguments
- `(;; The test suite requires the unpackaged Xephyr X server.
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'patch-session-file
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (i3 (string-append out "/bin/i3"))
- (i3-with-shmlog (string-append out "/bin/i3-with-shmlog")))
- (substitute* (string-append out "/share/xsessions/i3.desktop")
- (("Exec=i3") (string-append "Exec=" i3)))
- (substitute* (string-append out "/share/xsessions/i3-with-shmlog.desktop")
- (("Exec=i3-with-shmlog") (string-append "Exec=" i3-with-shmlog)))
- #t))))))
+ (list
+ ;; The test suite requires the unpackaged Xephyr X server.
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'patch-session-file
+ (lambda _
+ (let* ((i3 (string-append #$output "/bin/i3"))
+ (i3-with-shmlog (string-append #$output "/bin/i3-with-shmlog")))
+ (substitute* (string-append #$output "/share/xsessions/i3.desktop")
+ (("Exec=i3") (string-append "Exec=" i3)))
+ (substitute* (string-append #$output "/share/xsessions/i3-with-shmlog.desktop")
+ (("Exec=i3-with-shmlog") (string-append "Exec=" i3-with-shmlog)))))))))
(inputs
(list libxcb
xcb-util
--
2.39.1
S
S
SeerLite wrote on 7 Mar 04:44 +0100
[PATCH v2 2/2] gnu: i3-wm: Add missing inputs for i3-save-tree.
(address . 61975@debbugs.gnu.org)(name . SeerLite)(address . seerlite@disroot.org)
20230307034458.21736-2-seerlite@disroot.org
* gnu/packages/wm.scm (i3-wm)[inputs]: Add perl, perl-anyevent-i3,
perl-json-xs, perl-common-sense, and perl-types-serialiser.
[arguments]: Add phase to wrap i3-save-tree to use perl inputs listed above.
---
gnu/packages/wm.scm | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 3bdbc43c51..fe9a7b959d 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -332,12 +332,26 @@ (define-public i3-wm
#~(modify-phases %standard-phases
(add-after 'install 'patch-session-file
(lambda _
- (let* ((i3 (string-append #$output "/bin/i3"))
- (i3-with-shmlog (string-append #$output "/bin/i3-with-shmlog")))
+ (let ((i3 (string-append #$output "/bin/i3"))
+ (i3-with-shmlog (string-append #$output "/bin/i3-with-shmlog")))
(substitute* (string-append #$output "/share/xsessions/i3.desktop")
(("Exec=i3") (string-append "Exec=" i3)))
(substitute* (string-append #$output "/share/xsessions/i3-with-shmlog.desktop")
- (("Exec=i3-with-shmlog") (string-append "Exec=" i3-with-shmlog)))))))))
+ (("Exec=i3-with-shmlog") (string-append "Exec=" i3-with-shmlog))))))
+ (add-after 'patch-session-file 'wrap-perl-bin
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((i3-save-tree (string-append #$output "/bin/i3-save-tree"))
+ (perl-lib-names '("perl-anyevent"
+ "perl-anyevent-i3"
+ "perl-json-xs"
+ "perl-common-sense"
+ "perl-types-serialiser"))
+ (perl-lib-paths
+ (map (lambda (name)
+ (string-append (assoc-ref inputs name) "/lib/perl5/site_perl"))
+ perl-lib-names)))
+ (wrap-program i3-save-tree
+ `("PERL5LIB" ":" prefix ,perl-lib-paths))))))))
(inputs
(list libxcb
xcb-util
@@ -349,6 +363,11 @@ (define-public i3-wm
libev
yajl
xmlto
+ perl
+ perl-anyevent-i3
+ perl-json-xs
+ perl-common-sense
+ perl-types-serialiser
perl-pod-simple
libx11
pcre2
--
2.39.1
S
S
SeerLite wrote on 7 Mar 04:47 +0100
Re: bug#61975: [PATCH] gnu: i3-wm: Add missing propagated inputs.
(name . 宋文武)(address . iyzsong@envs.net)(address . 61975@debbugs.gnu.org)
7c2cad9e-45fd-1998-d0cc-24dfad01a7cb@disroot.org
Attachment: file
?