[PATCH 0/2] Make wayland-protocols dependency native-input.

  • Open
  • quality assurance status badge
Details
3 participants
  • Liliana Marie Prikler
  • muradm
  • Maxime Devos
Owner
unassigned
Submitted by
muradm
Severity
normal
M
M
muradm wrote on 16 Sep 2021 21:23
(address . guix-patches@gnu.org)
20210916192331.29606-1-mail@muradm.net
wayland-protocols is not runtime dependency and only build time
dependency for applications that directly using wayland.

Initially I tought that making wayland-protocols a native-inputs
dependency as it should, it would reduce number of dependants on
it. But it turns out other way around. With this patchset we are
fixing gtk+ to not advertise it as dependency in its .pc files,
and moving wayland-protocols to native-inputs where it should be.

Patch provided for gtk+ also merged with upstream.

Patchset prepared from core-updates-frozen. While it seems that
it will impact many other packages, actually this patch reduces
number of packages that touches wayland-protocols and probably
avoids it at runtime.

muradm (2):
gnu: gtk: Move wayland-protocols to native-inputs.
gnu: Fix wayland-protocols dependency to be in native-inputs.

gnu/packages/arcan.scm | 6 ++--
gnu/packages/enlightenment.scm | 10 +++----
gnu/packages/fcitx5.scm | 4 +--
gnu/packages/freedesktop.scm | 14 +++++-----
gnu/packages/gl.scm | 10 +++----
gnu/packages/gtk.scm | 7 +++--
gnu/packages/image.scm | 12 ++++----
gnu/packages/julia-jll.scm | 2 +-
gnu/packages/kde-frameworks.scm | 6 ++--
gnu/packages/kodi.scm | 4 ++-
gnu/packages/language.scm | 2 +-
.../gtk3-wayland-protocols-dependency.patch | 23 +++++++++++++++
gnu/packages/sdl.scm | 5 ++--
gnu/packages/video.scm | 28 +++++++++----------
gnu/packages/wm.scm | 4 +--
gnu/packages/xdisorg.scm | 20 ++++++-------
gnu/packages/xorg.scm | 4 ++-
17 files changed, 95 insertions(+), 66 deletions(-)
create mode 100644 gnu/packages/patches/gtk3-wayland-protocols-dependency.patch

--
2.33.0
M
M
muradm wrote on 16 Sep 2021 21:26
[PATCH 1/2] gnu: gtk: Move wayland-protocols to native-inputs.
(address . 50627@debbugs.gnu.org)
20210916192646.29726-1-mail@muradm.net
I was building some packages on Guix. I figured out that
wayland-protocols was listed among propagated-inputs for gtk+ package.

wayland-protocols is not runtime dependency, so I moved it to
native-inputs of gtk+ package, once moved, building of other
applications that depening on gtk+ started to fail.

Investigation showed that, all .pc (pkg-config) files prepared by gtk+
package, was including:

Requires.private: ... wayland-protocols ...

Since it becomes requirement, other applications was failing with
missing dependency wayland-protocols of dependency gtk+, for instance:

-- Checking for module 'gtk+-3.0'
-- Package 'wayland-protocols', required by 'gdk-3.0', not found

While actually wayland-protocols is not even a build time dependency
of application that depends on gtk+. Advertisement of such
requirement, is a bit misleading, because one does not need it at
runtime, especially applications based on gtk.

Same change also merged upstream for both master and gtk-3-24 branch.

* gnu/packages/patches/gtk3-wayland-protocols-dependency.patch:
Upstream change
* gnu/packages/gtk.scm (gtk+): move wayland-protocols to native-inputs
---
gnu/packages/gtk.scm | 7 +++---
.../gtk3-wayland-protocols-dependency.patch | 23 +++++++++++++++++++
2 files changed, 27 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/gtk3-wayland-protocols-dependency.patch

Toggle diff (63 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 24c24d5653..2dbfcde6e5 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -948,7 +948,8 @@ application suites.")
(base32
"1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
(patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
- "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+ "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"
+ "gtk3-wayland-protocols-dependency.patch"))))
(propagated-inputs
`(("atk" ,atk)
("at-spi2-atk" ,at-spi2-atk)
@@ -978,8 +979,7 @@ application suites.")
("libxrender" ,libxrender)
("mesa" ,mesa)
("pango" ,pango)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(inputs
`(("colord" ,colord)
("cups" ,cups)
@@ -999,6 +999,7 @@ application suites.")
("pkg-config" ,pkg-config)
("python-wrapper" ,python-wrapper)
("sassc" ,sassc)
+ ("wayland-protocols" ,wayland-protocols)
;; By using a special xorg-server for GTK+'s tests, we reduce the impact
;; of updating xorg-server directly on the master branch.
("xorg-server" ,xorg-server-for-tests)
diff --git a/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
new file mode 100644
index 0000000000..03196713bc
--- /dev/null
+++ b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
@@ -0,0 +1,23 @@
+diff --git a/configure b/configure
+index edd41ad..cb36877 100755
+--- a/configure
++++ b/configure
+@@ -23247,7 +23247,8 @@ $as_echo "no" >&6; }
+ fi
+ fi
+
+-WAYLAND_DEPENDENCIES="wayland-client >= 1.14.91 wayland-protocols >= 1.17 xkbcommon >= 0.2.0 wayland-cursor >= 1.14.91 wayland-egl"
++WAYLAND_RUNTIME_DEPENDENCIES="wayland-client >= 1.14.91 xkbcommon >= 0.2.0 wayland-cursor >= 1.14.91 wayland-egl"
++WAYLAND_DEPENDENCIES="wayland-protocols >= 1.17 $WAYLAND_RUNTIME_DEPENDENCIES"
+ if test "$enable_wayland_backend" = "maybe" ; then
+ # Extract the first word of "wayland-scanner", so it can be a program name with args.
+ set dummy wayland-scanner; ac_word=$2
+@@ -23320,7 +23321,7 @@ if test "$enable_wayland_backend" = "yes"; then
+ GDK_WINDOWING="$GDK_WINDOWING
+ #define GDK_WINDOWING_WAYLAND"
+ backend_immodules="$backend_immodules,wayland"
+- WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
++ WAYLAND_PACKAGES="$WAYLAND_RUNTIME_DEPENDENCIES"
+ # Extract the first word of "wayland-scanner", so it can be a program name with args.
+ set dummy wayland-scanner; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
--
2.33.0
M
M
muradm wrote on 16 Sep 2021 21:26
[PATCH 2/2] gnu: Fix wayland-protocols dependency to be in native-inputs.
(address . 50627@debbugs.gnu.org)
20210916192646.29726-2-mail@muradm.net
While wayland-protocols is a build time dependency, some packages
used it in normal inputs or even propagated-inputs.

This moves wayland-protocols dependency to native-inputs across
related packages.

* gnu/packages/arcan.scm (arcan-wayland): updated
* gnu/packages/enlightenment.scm (efl): updated
* gnu/packages/enlightenment.scm (enlightenment): updated
* gnu/packages/fcitx5.scm (fcitx5): updated
* gnu/packages/freedesktop.scm (weston): updated
* gnu/packages/freedesktop.scm (wev): updated
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): updated
* gnu/packages/gl.scm (mesa): updated
* gnu/packages/gl.scm (glmark2): updated
* gnu/packages/image.scm (grim): updated
* gnu/packages/image.scm (slurp): updated
* gnu/packages/julia-jll.scm (julia-wayland-protocols-jll): updated
* gnu/packages/kde-frameworks.scm (kwayland): updated
* gnu/packages/kodi.scm (kodi/wayland): updated
* gnu/packages/language.scm (nimf): updated
* gnu/packages/sdl.scm (sdl2): updated
* gnu/packages/video.scm (vlc): updated
* gnu/packages/video.scm (mpv): updated
* gnu/packages/video.scm (obs): updated
* gnu/packages/video.scm (obs-wlrobs): updated
* gnu/packages/video.scm (wlstream): updated
* gnu/packages/video.scm (wf-recorder): updated
* gnu/packages/wm.scm (wlroots): updated
* gnu/packages/xdisorg.scm (bemenu): updated
* gnu/packages/xdisorg.scm (libxkbcommon): updated
* gnu/packages/xdisorg.scm (wob): updated
* gnu/packages/xdisorg.scm (wl-clipboard): updated
* gnu/packages/xorg.scm (xorg-server-xwayland): updated
---
gnu/packages/arcan.scm | 6 +++---
gnu/packages/enlightenment.scm | 10 +++++-----
gnu/packages/fcitx5.scm | 4 ++--
gnu/packages/freedesktop.scm | 14 +++++++-------
gnu/packages/gl.scm | 10 +++++-----
gnu/packages/image.scm | 12 ++++++------
gnu/packages/julia-jll.scm | 2 +-
gnu/packages/kde-frameworks.scm | 6 +++---
gnu/packages/kodi.scm | 4 +++-
gnu/packages/language.scm | 2 +-
gnu/packages/sdl.scm | 5 +++--
gnu/packages/video.scm | 28 ++++++++++++++--------------
gnu/packages/wm.scm | 4 ++--
gnu/packages/xdisorg.scm | 20 ++++++++++----------
gnu/packages/xorg.scm | 4 +++-
15 files changed, 68 insertions(+), 63 deletions(-)

Toggle diff (447 lines)
diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index 721cd7fd70..da7e445d1e 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -251,14 +251,14 @@ as a window under Arcan.")
(inherit arcan)
(name "arcan-wayland")
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("arcan" ,arcan)
("libseccomp" ,libseccomp)
("libxkbcommon" ,libxkbcommon)
("mesa" ,mesa)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(arguments
`(#:tests? #f
#:phases
diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 9c83e9b482..63237539aa 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -82,7 +82,8 @@
(native-inputs
`(("check" ,check-0.14)
("gettext" ,gettext-minimal)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("curl" ,curl)
("giflib" ,giflib)
@@ -110,8 +111,7 @@
("libwebp" ,libwebp)
("openjpeg" ,openjpeg)
("poppler" ,poppler)
- ("util-linux" ,util-linux "lib")
- ("wayland-protocols" ,wayland-protocols)))
+ ("util-linux" ,util-linux "lib")))
(propagated-inputs
;; All these inputs are in package config files in section
;; Requires.private.
@@ -353,7 +353,8 @@ Libraries with some extra bells and whistles.")
#t))))))
(native-inputs
`(("gettext" ,gettext-minimal)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("alsa-lib" ,alsa-lib)
("bc" ,bc)
@@ -371,7 +372,6 @@ Libraries with some extra bells and whistles.")
(propagated-inputs
`(("efl" ,efl)
("libxkbcommon" ,libxkbcommon)
- ("wayland-protocols" ,wayland-protocols)
;; Default font that applications such as IceCat require.
("font-dejavu" ,font-dejavu)))
diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index 737f47f20f..f1f018b292 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -126,7 +126,6 @@ client.")
("pango" ,pango)
("unicode-cldr-common" ,unicode-cldr-common)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("xcb-imdkit" ,xcb-imdkit)
("xcb-util" ,xcb-util)
("xcb-util-keysyms" ,xcb-util-keysyms)
@@ -135,7 +134,8 @@ client.")
(native-inputs
`(("gcc" ,gcc-9) ; for #include <charconv>
("extra-cmake-modules" ,extra-cmake-modules)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(native-search-paths
(list (search-path-specification
(variable "FCITX_ADDON_DIRS")
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 85d9697460..a8fd24e807 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1083,6 +1083,7 @@ protocol either in Wayland core, or some other protocol in wayland-protocols.")
(native-inputs
`(("mscgen" ,mscgen)
("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)
("xorg-server" ,xorg-server)))
(inputs
`(("cairo" ,cairo-xcb)
@@ -1111,7 +1112,6 @@ protocol either in Wayland core, or some other protocol in wayland-protocols.")
("linux-pam" ,linux-pam)
("pango" ,pango)
("pipewire" ,pipewire)
- ("wayland-protocols" ,wayland-protocols)
("xorg-server-xwayland" ,xorg-server-xwayland)))
(propagated-inputs
`(("libxkbcommon" ,libxkbcommon)
@@ -1193,11 +1193,11 @@ multiplexer to the KMS/DRM Linux kernel devices.")
(delete 'configure))))
(native-inputs
`(("pkg-config" ,pkg-config)
- ("scdoc" ,scdoc)))
+ ("scdoc" ,scdoc)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("libxkbcommon" ,libxkbcommon)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://git.sr.ht/~sircmpwn/wev")
(synopsis "Wayland event viewer")
(description "Wev is a tool that opens a window, printing all events
@@ -2454,14 +2454,14 @@ interfaces.")
"-Dsd-bus-provider=libelogind")))
(native-inputs
`(("cmake" ,cmake)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("elogind" ,elogind)
("iniparser" ,iniparser)
("pipewire" ,pipewire-0.3)
("inih" ,libinih)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
(synopsis "@code{xdg-desktop-portal} backend for wlroots")
(description
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 769389e370..5cf2866c2a 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -279,8 +279,7 @@ also known as DXTn or DXTC) for Mesa.")
`(("llvm" ,llvm-11)))
(_
`()))
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(native-inputs
`(("bison" ,bison)
("flex" ,flex)
@@ -293,6 +292,7 @@ also known as DXTn or DXTC) for Mesa.")
("pkg-config" ,pkg-config)
("python" ,python-wrapper)
("python-mako" ,python-mako)
+ ("wayland-protocols" ,wayland-protocols)
("which" ,(@ (gnu packages base) which))))
(outputs '("out" "bin"))
(arguments
@@ -1118,7 +1118,8 @@ is written in a way that can be used for any general C# application.")
(("libGLESv2.so") (string-append mesa "/lib/libGLESv2.so")))
#t))))))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("eudev" ,eudev)
("libdrm" ,libdrm)
@@ -1127,8 +1128,7 @@ is written in a way that can be used for any general C# application.")
("libx11" ,libx11)
("libxcb" ,libxcb)
("mesa" ,mesa)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://github.com/glmark2/glmark2")
(synopsis "OpenGL 2.0 and OpenGL ES 2.0 benchmark")
(description
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 2dd64d7c4c..527fc1d774 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1980,11 +1980,11 @@ identical visual appearance.")
(base32 "1l4gwvvc0zvg5b6f6w92xjhmwj7cg9hlgrf43lc7ygaz8dh6cmzg"))))
(build-system meson-build-system)
(native-inputs `(("pkg-config" ,pkg-config)
- ("scdoc" ,scdoc)))
+ ("scdoc" ,scdoc)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs `(("cairo" ,cairo)
("libjpeg-turbo" ,libjpeg-turbo)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://github.com/emersion/grim")
(synopsis "Create screenshots from a Wayland compositor")
(description "grim can create screenshots from a Wayland compositor.")
@@ -2007,12 +2007,12 @@ identical visual appearance.")
(build-system meson-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
- ("scdoc" ,scdoc)))
+ ("scdoc" ,scdoc)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("cairo" ,cairo)
("libxkbcommon" ,libxkbcommon)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://github.com/emersion/slurp")
(synopsis "Select a region in a Wayland compositor")
(description "Slurp can select a region in a Wayland compositor and print it
diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm
index d18971ad48..1ad414ef34 100644
--- a/gnu/packages/julia-jll.scm
+++ b/gnu/packages/julia-jll.scm
@@ -1600,7 +1600,7 @@ build tree Yggdrasil.")
(string-append "\"" (assoc-ref inputs "wayland-protocols") "\""))))
;; There's a Julia file for each platform, override them all
(find-files "src/wrappers/" "\\.jl$")))))))
- (inputs
+ (native-inputs
`(("wayland-protocols" ,wayland-protocols)))
(propagated-inputs
`(("julia-jllwrappers" ,julia-jllwrappers)
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 83bf7bd95a..bfd7631080 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -1077,12 +1077,12 @@ integration with a custom editor as well as a ready-to-use
(build-system cmake-build-system)
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("qtbase" ,qtbase-5)
("qtwayland" ,qtwayland)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(arguments
`(#:tests? #f ; FIXME tests require weston to run
; weston requires wayland flags in mesa
diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm
index 0ed5d829fb..0212e93952 100644
--- a/gnu/packages/kodi.scm
+++ b/gnu/packages/kodi.scm
@@ -474,11 +474,13 @@ plug-in system.")
`(append '("-DCORE_PLATFORM_NAME=wayland"
"-DWAYLAND_RENDER_SYSTEM=gl")
,flags))))
+ (native-inputs
+ `(("waylandp-protocols" ,wayland-protocols)
+ ,@(package-native-inputs kodi)))
(inputs
`(("libinput" ,libinput)
("libxkbcommon" ,libxkbcommon)
("waylandpp" ,waylandpp)
- ("waylandp-protocols" ,wayland-protocols)
,@(package-inputs kodi)))
(synopsis "Kodi with Wayland rendering backend")))
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 83838b5689..79dad2a60a 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -176,6 +176,7 @@
("libtool" ,libtool)
("perl" ,perl)
("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)
("which" ,which)))
(inputs
`(("anthy" ,anthy)
@@ -189,7 +190,6 @@
("rime" ,librime)
("rsvg" ,librsvg)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("x11" ,libx11)
("xkbcommon" ,libxkbcommon)
("xklavier" ,libxklavier)))
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index f2afe763c5..90874a6d67 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -138,6 +138,8 @@ joystick, and graphics hardware.")
(string-append "LDFLAGS=-Wl,-rpath,"
(assoc-ref %build-inputs "eudev") "/lib")
,flags))))
+ (native-inputs
+ `(("wayland-protocols" ,wayland-protocols)))
(inputs
;; SDL2 needs to be built with ibus support otherwise some systems
;; experience a bug where input events are doubled.
@@ -150,8 +152,7 @@ joystick, and graphics hardware.")
("ibus" ,ibus)
("libxkbcommon" ,libxkbcommon)
("libxcursor" ,libxcursor) ; enables X11 cursor support
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols))
+ ("wayland" ,wayland))
(package-inputs sdl)))
(license bsd-3)))
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index be9df8cc65..57fb5e0fee 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1822,7 +1822,8 @@ videoformats depend on the configuration flags of ffmpeg.")
`(("flex" ,flex)
("bison" ,bison)
("gettext" ,gettext-minimal)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
;; FIXME: Add optional inputs once available.
(inputs
`(("alsa-lib" ,alsa-lib)
@@ -1897,7 +1898,6 @@ videoformats depend on the configuration flags of ffmpeg.")
("twolame" ,twolame)
("unzip" ,unzip)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("x265" ,x265)
("xcb-util-keysyms" ,xcb-util-keysyms)))
(arguments
@@ -2065,7 +2065,8 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
(native-inputs
`(("perl" ,perl) ; for zsh completion file
("pkg-config" ,pkg-config)
- ("python-docutils" ,python-docutils)))
+ ("python-docutils" ,python-docutils)
+ ("wayland-protocols" ,wayland-protocols)))
;; Missing features: libguess, V4L2
(inputs
`(("alsa-lib" ,alsa-lib)
@@ -2102,7 +2103,6 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
("vulkan-loader" ,vulkan-loader)
("waf" ,python-waf)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("libxkbcommon" ,libxkbcommon)
("youtube-dl" ,youtube-dl)
("zlib" ,zlib)))
@@ -3215,7 +3215,8 @@ be used for realtime video capture via Linux-specific APIs.")
(files '("share/obs/obs-plugins")))))
(native-inputs
`(("cmocka" ,cmocka)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("alsa-lib" ,alsa-lib)
("curl" ,curl)
@@ -3238,7 +3239,6 @@ be used for realtime video capture via Linux-specific APIs.")
("speexdsp" ,speexdsp)
("v4l-utils" ,v4l-utils)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("zlib" ,zlib)))
(synopsis "Live streaming software")
(description "Open Broadcaster Software provides a graphical interface for
@@ -3333,12 +3333,12 @@ programs on your current machine or on other machines.")
"1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
(build-system meson-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(propagated-inputs `() )
(inputs `(("obs" ,obs)
("libx11" ,libx11 "out")
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://hg.sr.ht/~scoopta/wlrobs")
(synopsis "OBS plugin for Wayland (wlroots) screen capture")
(description
@@ -4789,11 +4789,11 @@ speed and correctness.")
"01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
(build-system meson-build-system)
(native-inputs `(("libdrm" ,libdrm)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs `(("ffmpeg" ,ffmpeg)
("pulseaudio" ,pulseaudio)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(home-page "https://github.com/atomnuker/wlstream")
(synopsis "Screen capture tool for Wayland sessions")
(description "Wlstream is a screen capture tool for recording audio and
@@ -5165,12 +5165,12 @@ can also directly record to WebM or MP4 if you prefer.")
"1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
(build-system meson-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(inputs
`(("ffmpeg" ,ffmpeg)
("pulseaudio" ,pulseaudio)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("libx264" ,libx264)))
(home-page "https://github.com/ammen99/wf-recorder")
(synopsis "Screen recorder for wlroots-based compositors")
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 66440e5008..fa8fe391df 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1452,12 +1452,12 @@ functionality to display information about the most commonly used services.")
("mesa" ,mesa)
("pixman" ,pixman)
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
("xcb-util-errors" ,xcb-util-errors)
("xcb-util-wm" ,xcb-util-wm)
("xorg-server-xwayland" ,xorg-server-xwayland)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("wayland-protocols" ,wayland-protocols)))
(home-page "https://github.com/swaywm/wlroots")
(synopsis "Pluggable, composable, unopinionated modules for building a
Wayland compositor")
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 129c90d22c..ed47f916ac 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -292,11 +292,11 @@ used to further tweak the behaviour of the different profiles.")
("libxinerama" ,libxinerama)
("ncurses" ,ncurses)
("pango" ,pango)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(native-inputs
`(("doxygen"
This message was truncated. Download the full message here.
L
L
Liliana Marie Prikler wrote on 16 Sep 2021 21:57
Re: [PATCH 0/2] Make wayland-protocols dependency native-input.
f6b0cca9359ae6b8e806d54f242b6fe1936c44a4.camel@gmail.com
Hi,

Am Donnerstag, den 16.09.2021, 22:23 +0300 schrieb muradm:
Toggle quote (2 lines)
> wayland-protocols is not runtime dependency and only build time
> dependency for applications that directly using wayland.
Guix does not distinguish between "build time" and run time
dependencies.

Toggle quote (5 lines)
> Initially I tought that making wayland-protocols a native-inputs
> dependency as it should, it would reduce number of dependants on
> it. But it turns out other way around. With this patchset we are
> fixing gtk+ to not advertise it as dependency in its .pc files,
> and moving wayland-protocols to native-inputs where it should be.
That's not what native-inputs are used for. native-inputs provide
binaries that the host/build machine needs to run in order to compile a
package. It doesn't seem to be the case that wayland-protocols is such
a package, is it?

Toggle quote (6 lines)
> Patch provided for gtk+ also merged with upstream.
>
> Patchset prepared from core-updates-frozen. While it seems that
> it will impact many other packages, actually this patch reduces
> number of packages that touches wayland-protocols and probably
> avoids it at runtime.
But it still impacts a large number of packages in ways that could
potentially break and haven't been tested, right? While reducing
closure size is generally a good thing, I think we do need to be
careful whenever "build time vs. run time" and native vs. non-native
are confused.

Regards
M
M
muradm wrote on 17 Sep 2021 04:35
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 50627@debbugs.gnu.org)
87ilyzg96v.fsf@muradm.net
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (7 lines)
> Hi,
>
> Am Donnerstag, den 16.09.2021, 22:23 +0300 schrieb muradm:
>> wayland-protocols is not runtime dependency and only build time
>> dependency for applications that directly using wayland.
> Guix does not distinguish between "build time" and run time
> dependencies.
True, here issue could be related to miss wording, but same
wording
is used in the manual as well, so do I.

Toggle quote (16 lines)
>> Initially I tought that making wayland-protocols a
>> native-inputs
>> dependency as it should, it would reduce number of dependants
>> on
>> it. But it turns out other way around. With this patchset we
>> are
>> fixing gtk+ to not advertise it as dependency in its .pc files,
>> and moving wayland-protocols to native-inputs where it should
>> be.
> That's not what native-inputs are used for. native-inputs
> provide
> binaries that the host/build machine needs to run in order to
> compile a
> package. It doesn't seem to be the case that wayland-protocols
> is such
> a package, is it?
wayland-protocols is different package. It does not include any
binaries
only protocol specifications (some xml files), which are used for
code
generation. We could consider them as a kind of autoconf/bison
like
inputs, but tightly scoped for wayland needs, although they are
not so
and not binaries.

Toggle quote (9 lines)
>> Patch provided for gtk+ also merged with upstream.
>>
>> Patchset prepared from core-updates-frozen. While it seems that
>> it will impact many other packages, actually this patch reduces
>> number of packages that touches wayland-protocols and probably
>> avoids it at runtime.
> But it still impacts a large number of packages in ways that
> could
> potentially break and haven't been tested, right?
Technically, this package does not change anything in terms of
binary
producing. wayland-protocols remains to be an input as it was
before.
I.e. wayland compositor, wayland application, wayland using
library,
application which uses wayland using library, binary output is not
impacted. If binary output is the same, is there any thing else to
test?

There are two things which are being changed. First as you
pointing
out is the way Guix treats it, i.e. reducing closure, etc. Second
is
propagation of inputs. Currently (without this patch), since it is
listed in propagated-inputs (and also advertised in .pc files),
wayland-protocols as requirement, needlessly, getting pushed down
then hierarchy.

Let's take 4 cases that we have here (I do not pretend to be
complete,
of course, there are might be more levels/combinations, just
attempting
to illustrate current case in simple words/terms):

1. wayland compositor (weston, wlroots/sway, etc.)
2. wayland client application (grim, mpv, etc. applications
directly
interacting with wayland interfaces)
3. wayland client library (qt or gtk+ in this case, also directly
interacts with wayland to abstract it for user applications)
4. user application of wayland client library (in this case some
gtk+
based application)

For 1 and 2, both types should have to specify wayland in inputs
(or
propagated-inputs), and wayland-protocols in native-inputs.

One of purposes to have layer 3, is to abstract from 1 and 2.
i.e. when I write gtk application, as user I should not be aware
of
where/how this application is going to run, via xorg or wayland.
Then
why I should be aware of wayland/wayland-protocols and make sure
that
it is provided as build input for my application?

More over, if I will have some other unrelated package that
depends
on my gtk application (item 4 above), i still will see
wayland-protocols among my inputs.

Currently, thanks to Guix, it is getting resolved by having it
listed
in propagated-inputs.

For the long run, it was also fixed in gtk, so that
wayland-protocols
is not going to be advertised in gtk's .pc files any more

I suppose that, initially wayland-protocols was listed in
propagated-inputs for this same reason, because gtk was
advertising
it in .pc files.

Toggle quote (5 lines)
> While reducing
> closure size is generally a good thing, I think we do need to be
> careful whenever "build time vs. run time" and native vs.
> non-native
> are confused.
I'm using terminology as per documentation :) may be it should be
reworded in some other way to avoid confusion. 8.2.1 package
reference:

‘native-inputs’ is typically used to list tools needed
at
build time, but not at run time...

Thanks in advance,
muradm
L
L
Liliana Marie Prikler wrote on 17 Sep 2021 09:46
(name . muradm)(address . mail@muradm.net)(address . 50627@debbugs.gnu.org)
4bb63f130f3ec7dac628a8139c405cdc202412e9.camel@gmail.com
Hi

Am Freitag, den 17.09.2021, 05:35 +0300 schrieb muradm:
Toggle quote (11 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Hi,
> >
> > Am Donnerstag, den 16.09.2021, 22:23 +0300 schrieb muradm:
> > > wayland-protocols is not runtime dependency and only build time
> > > dependency for applications that directly using wayland.
> > Guix does not distinguish between "build time" and run time
> > dependencies.
> True, here issue could be related to miss wording, but same
> wording is used in the manual as well, so do I.
I'll respond to that in your quote below.

Toggle quote (15 lines)
> > > Initially I tought that making wayland-protocols a
> > > native-inputs dependency as it should, it would reduce number of
> > > dependants on it. But it turns out other way around. With this
> > > patchset we are fixing gtk+ to not advertise it as dependency in
> > > its .pc files, and moving wayland-protocols to native-inputs
> > > where it should be.
> > That's not what native-inputs are used for. native-inputs
> > provide binaries that the host/build machine needs to run in order
> > to compile a package. It doesn't seem to be the case that wayland-
> > protocols is such a package, is it?
> wayland-protocols is different package. It does not include any
> binaries only protocol specifications (some xml files), which are
> used for code generation. We could consider them as a kind of
> autoconf/bison like inputs, but tightly scoped for wayland needs,
> although they are not so and not binaries.
And what kind of code is generated from them? I would assume it's
target code. And since wayland-protocols is no tool to process those
XML files, but the files themselves, I'd hazard a guess that it should
rather be built for the target. While currently this appears to make
no difference, there might well be a time in which those files differ
for some two architectures, which then would cause problems in cross-
compiling contexts were it a native input.

Toggle quote (15 lines)
> > > Patch provided for gtk+ also merged with upstream.
> > >
> > > Patchset prepared from core-updates-frozen. While it seems that
> > > it will impact many other packages, actually this patch reduces
> > > number of packages that touches wayland-protocols and probably
> > > avoids it at runtime.
> > But it still impacts a large number of packages in ways that
> > could
> > potentially break and haven't been tested, right?
> Technically, this package does not change anything in terms of
> binary producing. wayland-protocols remains to be an input as it was
> before. I.e. wayland compositor, wayland application, wayland using
> library, application which uses wayland using library, binary output
> is not impacted. If binary output is the same, is there any thing
> else to test?
In that case I'd hazard a guess that it's fine, but the phrase
"wayland-protocols remains to be an input" is perhaps a bit weird given
the change to native-input.

Toggle quote (6 lines)
> There are two things which are being changed. First as you
> pointing out is the way Guix treats it, i.e. reducing closure, etc.
> Second is propagation of inputs. Currently (without this patch),
> since it is listed in propagated-inputs (and also advertised in .pc
> files), wayland-protocols as requirement, needlessly, getting pushed
> down then hierarchy.
We ought to move it from propagated-inputs to inputs and either (if we
can) ignore pkg-config or patch the pkg-config files. W.r.t. pkg-
config I do wonder whether Requires.private needs propagation, though,
it normally should be just Requires.

Toggle quote (14 lines)
> Let's take 4 cases that we have here (I do not pretend to be
> complete, of course, there are might be more levels/combinations,
> just attempting to illustrate current case in simple words/terms):
>
> 1. wayland compositor (weston, wlroots/sway, etc.)
> 2. wayland client application (grim, mpv, etc. applications
> directly interacting with wayland interfaces)
> 3. wayland client library (qt or gtk+ in this case, also directly
> interacts with wayland to abstract it for user applications)
> 4. user application of wayland client library (in this case some
> gtk+ based application)
>
> For 1 and 2, both types should have to specify wayland in inputs
> (or propagated-inputs), and wayland-protocols in native-inputs.
Why?

Toggle quote (5 lines)
> One of purposes to have layer 3, is to abstract from 1 and 2.
> i.e. when I write gtk application, as user I should not be aware
> of where/how this application is going to run, via xorg or wayland.
> Then why I should be aware of wayland/wayland-protocols and make
> sure that it is provided as build input for my application?
IIUC you don't need to be aware when gtk propagates the input? It's
similar to how you still need an Xorg server to test your GTK
application.

Toggle quote (11 lines)
> More over, if I will have some other unrelated package that
> depends on my gtk application (item 4 above), i still will see
> wayland-protocols among my inputs.
>
> Currently, thanks to Guix, it is getting resolved by having it
> listed in propagated-inputs.
>
> For the long run, it was also fixed in gtk, so that
> wayland-protocols is not going to be advertised in gtk's .pc files
> any more (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3960
> and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3961).
Which is fine in and of its own, but not the right thing w.r.t. native-
inputs.

Toggle quote (3 lines)
> I suppose that, initially wayland-protocols was listed in
> propagated-inputs for this same reason, because gtk was
> advertising it in .pc files.
Probably.

Toggle quote (9 lines)
> > While reducing closure size is generally a good thing, I think we
> > do need to be careful whenever "build time vs. run time" and native
> > vs. non-native are confused.
> I'm using terminology as per documentation :) may be it should be
> reworded in some other way to avoid confusion. 8.2.1 package
> reference:
>
> ‘native-inputs’ is typically used to list tools needed
> at build time, but not at run time...
You're quoting the manual out-of-context and (accidentally) misuse the
word tool.

Toggle quote (4 lines)
> When cross-compiling, dependencies listed in ‘inputs’ are
> built for the _target_ architecture; conversely,
> dependencies listed in ‘native-inputs’ are built for the
> architecture of the _build_ machine.
This is the distinction to make here. "Typically used to list tools"
here means that the package provides a tool (i.e. a binary) that you
invoke at some point of your recipe. This can be a compiler like GCC,
a tool to create Makefiles like automake, or an X server to launch
tests in. The only thing in that regard when talking about wayland
would be the wayland-scanner tool provided by the wayland package.

Notice the contrast to what you said before with wayland being an input
and wayland-protocols being a native one. If you need wayland-scanner
for you build, it should be a native-input (as well as an input,
probably). If this does become a problem later on, a bin/lib split for
wayland might make sense.

Regards
M
M
muradm wrote on 17 Sep 2021 10:20
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 50627@debbugs.gnu.org)
875yuzfqqw.fsf@muradm.net
Regardless of comments below, I understand what you are trying to
point
out. It is fine with me to use 'inputs instead of 'native-inputs,
as the
final result won't change. Just in my opinion, what I found it
that, it
need/should not be in 'propagated-inputs. I will be updating the
patch
to make sure that wayland-protocols are listed among 'inputs
without
propagating. It is also fine with me to close this issue and don't
do
anything if you say that it is unnecessary, I don't mind :)

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (53 lines)
> Hi
>
> Am Freitag, den 17.09.2021, 05:35 +0300 schrieb muradm:
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > Hi,
>> >
>> > Am Donnerstag, den 16.09.2021, 22:23 +0300 schrieb muradm:
>> > > wayland-protocols is not runtime dependency and only build
>> > > time
>> > > dependency for applications that directly using wayland.
>> > Guix does not distinguish between "build time" and run time
>> > dependencies.
>> True, here issue could be related to miss wording, but same
>> wording is used in the manual as well, so do I.
> I'll respond to that in your quote below.
>
>> > > Initially I tought that making wayland-protocols a
>> > > native-inputs dependency as it should, it would reduce
>> > > number of
>> > > dependants on it. But it turns out other way around. With
>> > > this
>> > > patchset we are fixing gtk+ to not advertise it as
>> > > dependency in
>> > > its .pc files, and moving wayland-protocols to
>> > > native-inputs
>> > > where it should be.
>> > That's not what native-inputs are used for. native-inputs
>> > provide binaries that the host/build machine needs to run in
>> > order
>> > to compile a package. It doesn't seem to be the case that
>> > wayland-
>> > protocols is such a package, is it?
>> wayland-protocols is different package. It does not include any
>> binaries only protocol specifications (some xml files), which
>> are
>> used for code generation. We could consider them as a kind of
>> autoconf/bison like inputs, but tightly scoped for wayland
>> needs,
>> although they are not so and not binaries.
> And what kind of code is generated from them? I would assume
> it's
> target code. And since wayland-protocols is no tool to process
> those
> XML files, but the files themselves, I'd hazard a guess that it
> should
> rather be built for the target. While currently this appears to
> make
> no difference, there might well be a time in which those files
> differ
> for some two architectures, which then would cause problems in
> cross-
> compiling contexts were it a native input.
As with any other kind of protocol, you can implement platform
specific
encoder/decoder, but protocol remains the same. Suppose,
connecting from
arm, to x86 or vice versa in the context of wayland, should
protocol
change? As you mentioned wayland-scanner below, that would be its
task
to interpret protocol specification in platform specific way. So I
would
speculate that in future these specifications would remain the
same.
Otherwise, that would defeat the point of having protocol.

Toggle quote (26 lines)
>> > > Patch provided for gtk+ also merged with upstream.
>> > >
>> > > Patchset prepared from core-updates-frozen. While it seems
>> > > that
>> > > it will impact many other packages, actually this patch
>> > > reduces
>> > > number of packages that touches wayland-protocols and
>> > > probably
>> > > avoids it at runtime.
>> > But it still impacts a large number of packages in ways that
>> > could
>> > potentially break and haven't been tested, right?
>> Technically, this package does not change anything in terms of
>> binary producing. wayland-protocols remains to be an input as
>> it was
>> before. I.e. wayland compositor, wayland application, wayland
>> using
>> library, application which uses wayland using library, binary
>> output
>> is not impacted. If binary output is the same, is there any
>> thing
>> else to test?
> In that case I'd hazard a guess that it's fine, but the phrase
> "wayland-protocols remains to be an input" is perhaps a bit
> weird given
> the change to native-input.
Probably, I'd better put single quote in front of the word when it
means symbol, and don't put one when it is human word :) in this
context
it was meaning literal input (regardless of type, be it 'inputs,
'native-inputs or 'propagated-inputs).

Toggle quote (17 lines)
>> There are two things which are being changed. First as you
>> pointing out is the way Guix treats it, i.e. reducing closure,
>> etc.
>> Second is propagation of inputs. Currently (without this
>> patch),
>> since it is listed in propagated-inputs (and also advertised in
>> .pc
>> files), wayland-protocols as requirement, needlessly, getting
>> pushed
>> down then hierarchy.
> We ought to move it from propagated-inputs to inputs and either
> (if we
> can) ignore pkg-config or patch the pkg-config files. W.r.t.
> pkg-
> config I do wonder whether Requires.private needs propagation,
> though,
> it normally should be just Requires.
I suppose, it is not in Guix's hands to control how pkg-config
files are
authored by software owners and/or interpreted by build tools.
What
Guix's can do, it to fix what is already there. This patch
illustrates
this point.

Toggle quote (20 lines)
>> Let's take 4 cases that we have here (I do not pretend to be
>> complete, of course, there are might be more
>> levels/combinations,
>> just attempting to illustrate current case in simple
>> words/terms):
>>
>> 1. wayland compositor (weston, wlroots/sway, etc.)
>> 2. wayland client application (grim, mpv, etc. applications
>> directly interacting with wayland interfaces)
>> 3. wayland client library (qt or gtk+ in this case, also
>> directly
>> interacts with wayland to abstract it for user applications)
>> 4. user application of wayland client library (in this case
>> some
>> gtk+ based application)
>>
>> For 1 and 2, both types should have to specify wayland in
>> inputs
>> (or propagated-inputs), and wayland-protocols in native-inputs.
> Why?
One implements the protocol, the other uses it. I.e. both need
stubs
generated from specification to agree. Which is not the case for
anything beyond 4. Otherwise, we would defeat whole point of
introducing abstractions.

Toggle quote (12 lines)
>> One of purposes to have layer 3, is to abstract from 1 and 2.
>> i.e. when I write gtk application, as user I should not be
>> aware
>> of where/how this application is going to run, via xorg or
>> wayland.
>> Then why I should be aware of wayland/wayland-protocols and
>> make
>> sure that it is provided as build input for my application?
> IIUC you don't need to be aware when gtk propagates the input?
> It's
> similar to how you still need an Xorg server to test your GTK
> application.
From application using gtk stand point, it does not matter what is
behind gtk. As you point out, of course me, as user launching
application, I have to provide some environment which could be
either xorg or wayland. But application's source should not be
aware of that fact.

Toggle quote (66 lines)
>> More over, if I will have some other unrelated package that
>> depends on my gtk application (item 4 above), i still will see
>> wayland-protocols among my inputs.
>>
>> Currently, thanks to Guix, it is getting resolved by having it
>> listed in propagated-inputs.
>>
>> For the long run, it was also fixed in gtk, so that
>> wayland-protocols is not going to be advertised in gtk's .pc
>> files
>> any more
>> (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3960
>> and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3961).
> Which is fine in and of its own, but not the right thing w.r.t.
> native-
> inputs.
>
>> I suppose that, initially wayland-protocols was listed in
>> propagated-inputs for this same reason, because gtk was
>> advertising it in .pc files.
> Probably.
>
>> > While reducing closure size is generally a good thing, I
>> > think we
>> > do need to be careful whenever "build time vs. run time" and
>> > native
>> > vs. non-native are confused.
>> I'm using terminology as per documentation :) may be it should
>> be
>> reworded in some other way to avoid confusion. 8.2.1 package
>> reference:
>>
>> ‘native-inputs’ is typically used to list tools
>> needed
>> at build time, but not at run time...
> You're quoting the manual out-of-context and (accidentally)
> misuse the
> word tool.
>
>> When cross-compiling, dependencies listed in ‘inputs’
>> are
>> built for the _target_ architecture; conversely,
>> dependencies listed in ‘native-inputs’ are built for
>> the
>> architecture of the _build_ machine.
> This is the distinction to make here. "Typically used to list
> tools"
> here means that the package provides a tool (i.e. a binary) that
> you
> invoke at some point of your recipe. This can be a compiler
> like GCC,
> a tool to create Makefiles like automake, or an X server to
> launch
> tests in. The only thing in that regard when talking about
> wayland
> would be the wayland-scanner tool provided by the wayland
> package.
>
> Notice the contrast to what you said before with wayland being
> an input
> and wayland-protocols being a native one. If you need
> wayland-scanner
> for you build, it should be a native-input (as well as an input,
> probably). If this does become a problem later on, a bin/lib
> split for
> wayland might make sense.
I understand what you are saying, however as far as I am aware,
people
being or not on the same page, tend to use simpler definitions for
referencing something. I was assuming that in this mailing list we
are on the same page, and free to choose to how reference things.
I suppose it would be fine to say "not runtime dependency", "build
time"
or "dependency for host platform when crosscompiling" in reference
to
'native-inputs. For instance when explaining this to one who sees
Guix
for the first time, I would say "run time" for 'inputs and "build
time"
for 'native-inputs, not mentioning "crosscompiling" at all on day
one.
Any way, I beleive it is more like phylosophical subject, than
technical.

Toggle quote (1 lines)
> Regards
L
L
Liliana Marie Prikler wrote on 17 Sep 2021 15:01
(name . muradm)(address . mail@muradm.net)(address . 50627@debbugs.gnu.org)
830e045c54e06b0b0beaee30837f575a25cec986.camel@gmail.com
Hi,

Am Freitag, den 17.09.2021, 11:20 +0300 schrieb muradm:
Toggle quote (8 lines)
> Regardless of comments below, I understand what you are trying to
> point out. It is fine with me to use 'inputs instead of 'native-
> inputs, as the final result won't change. Just in my opinion, what I
> found it that, it need/should not be in 'propagated-inputs. I will be
> updating the patch to make sure that wayland-protocols are listed
> among 'inputs without propagating. It is also fine with me to close
> this issue and don't do anything if you say that it is unnecessary, I
> don't mind :)
I agree that reducing propagated-inputs is a good thing, it should just
be moved to inputs. When you update the patch, please do use the
upstream version of gtk3-wayland-protocols-dependency.patch.

Toggle quote (18 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > And what kind of code is generated from them? I would assume
> > it's target code. And since wayland-protocols is no tool to
> > process those XML files, but the files themselves, I'd hazard a
> > guess that it should rather be built for the target. While
> > currently this appears to make no difference, there might well be a
> > time in which those files differ for some two architectures, which
> > then would cause problems in cross-compiling contexts were it a
> > native input.
> As with any other kind of protocol, you can implement platform
> specific encoder/decoder, but protocol remains the same. Suppose,
> connecting from arm, to x86 or vice versa in the context of wayland,
> should protocol change? As you mentioned wayland-scanner below, that
> would be its task to interpret protocol specification in platform
> specific way. So I would speculate that in future these
> specifications would remain the same.
> Otherwise, that would defeat the point of having protocol.
You are probably correct in that those files will likely stay the same
for all platforms, but there could be scenarios where for the sake of
performance or whatever else you might want to have some protocol
extensions. Platforms that don't support those then wouldn't ship said
protocol extensions.

Toggle quote (7 lines)
> > In that case I'd hazard a guess that it's fine, but the phrase
> > "wayland-protocols remains to be an input" is perhaps a bit
> > weird given the change to native-input.
> Probably, I'd better put single quote in front of the word when it
> means symbol, and don't put one when it is human word :) in this
> context it was meaning literal input (regardless of type, be it
> 'inputs, 'native-inputs or 'propagated-inputs).
In my personal experience people don't pronounce quotes, so it's better
to be explicit rather than implicit.

Toggle quote (15 lines)
> > > There are two things which are being changed. First as you
> > > pointing out is the way Guix treats it, i.e. reducing closure,
> > > etc. Second is propagation of inputs. Currently (without this
> > > patch), since it is listed in propagated-inputs (and also
> > > advertised in .pc files), wayland-protocols as requirement,
> > > needlessly, getting pushed down then hierarchy.
> > We ought to move it from propagated-inputs to inputs and either
> > (if we can) ignore pkg-config or patch the pkg-config
> > files. W.r.t. pkg-config I do wonder whether Requires.private
> > needs propagation, though, it normally should be just Requires.
> I suppose, it is not in Guix's hands to control how pkg-config
> files are authored by software owners and/or interpreted by build
> tools.
> What Guix's can do, it to fix what is already there. This patch
> illustrates this point.
The point of authoring is a weird one when Guix can absolutely still
patch the file *and* you supplied a patch that was accepted upstream.
A patch, which mind you is arguably more correct than the one you've
supplied for Guix, patching the build files themselves rather than
generated sources.

For other packages with similar issues without an upstream fix, you
could on the other hand simply substitute* the .pc file.

Toggle quote (23 lines)
> > > Let's take 4 cases that we have here (I do not pretend to be
> > > complete, of course, there are might be more levels/combinations,
> > > just attempting to illustrate current case in
> > > simple words/terms):
> > >
> > > 1. wayland compositor (weston, wlroots/sway, etc.)
> > > 2. wayland client application (grim, mpv, etc. applications
> > > directly interacting with wayland interfaces)
> > > 3. wayland client library (qt or gtk+ in this case, also
> > > directly
> > > interacts with wayland to abstract it for user applications)
> > > 4. user application of wayland client library (in this case
> > > some
> > > gtk+ based application)
> > >
> > > For 1 and 2, both types should have to specify wayland in
> > > inputs (or propagated-inputs), and wayland-protocols in native-
> > > inputs.
> > Why?
> One implements the protocol, the other uses it. I.e. both need
> stubs generated from specification to agree. Which is not the case
> for anything beyond 4. Otherwise, we would defeat whole point of
> introducing abstractions.
This still doesn't explain the *native*-inputs assertion.

Toggle quote (14 lines)
> > > One of purposes to have layer 3, is to abstract from 1 and 2.
> > > i.e. when I write gtk application, as user I should not be
> > > aware of where/how this application is going to run, via xorg or
> > > wayland. Then why I should be aware of wayland/wayland-protocols
> > > and make sure that it is provided as build input for my
> > > application?
> > IIUC you don't need to be aware when gtk propagates the input?
> > It's similar to how you still need an Xorg server to test your GTK
> > application.
> From application using gtk stand point, it does not matter what is
> behind gtk. As you point out, of course me, as user launching
> application, I have to provide some environment which could be
> either xorg or wayland. But application's source should not be
> aware of that fact.
This and that are different matters. Application source code continues
to be blissfully unaware of the fact, but the toolchains to build your
application are not. Think of it like this: When you use pkg-config
(or older -config binaries), they spit out a number of compiler and
linker flags to supply to gcc or ld. You as the application programmer
are typically unaware of those flags and their values, especially if
you turn down the verbosity of your build system, but that doesn't mean
they're not supplied.

Toggle quote (30 lines)
> [...]
> > > When cross-compiling, dependencies listed in ‘inputs’
> > > are built for the _target_ architecture; conversely,
> > > dependencies listed in ‘native-inputs’ are built for
> > > the architecture of the _build_ machine.
> > This is the distinction to make here. "Typically used to list
> > tools" here means that the package provides a tool (i.e. a binary)
> > that you invoke at some point of your recipe. This can be a
> > compiler like GCC, a tool to create Makefiles like automake, or an
> > X server to launch tests in. The only thing in that regard when
> > talking about wayland would be the wayland-scanner tool provided by
> > the wayland package.
> >
> > Notice the contrast to what you said before with wayland being
> > an input and wayland-protocols being a native one. If you need
> > wayland-scanner for you build, it should be a native-input (as well
> > as an input, probably). If this does become a problem later on, a
> > bin/lib split for wayland might make sense.
> I understand what you are saying, however as far as I am aware,
> people being or not on the same page, tend to use simpler definitions
> for referencing something. I was assuming that in this mailing list
> we are on the same page, and free to choose to how reference things.
> I suppose it would be fine to say "not runtime dependency", "build
> time" or "dependency for host platform when crosscompiling" in
> reference to 'native-inputs. For instance when explaining this to one
> who sees Guix for the first time, I would say "run time" for 'inputs
> and "build time" for 'native-inputs, not mentioning "crosscompiling"
> at all on day one.
> Any way, I believe it is more like philosophical subject, than
> technical.
I think it is important to acknowledge that people come from different
backgrounds, and knowing that to do our best to curb misunderstandings.
Comparing Guix' package definitions to other package managers makes it
obvious as to why that is the case. Let me pick Gentoo ebuilds as an
example (it's quicker to explain than whatever Debian has).
There are five (as opposed to three in Guix) kinds of dependencies:
- DEPEND, aka build-time dependencies,
- RDEPEND, aka run-time dependencies,
- BDEPEND, aka native build-time dependencies,
- IDEPEND, aka native install-time dependenices, and
- PDEPEND, aka what the fuck, I think I just introduced a cycle
somewhere.
When you say "build-time dependencies go into native inputs", someone
with a shallow understanding might think that *all* build time
dependencies are native inputs, when in fact only build time tools
(i.e. BDEPEND in Gentoo parlance) would go there.

In other systems, it might be acceptable to have a package depend on
some other package without said dependency being present at build time.
Consider a shell script that wraps youtube-dl. Since youtube-dl exists
at some point between installation and first use, your shell script
works™ whether or not youtube-dl is present at build. Some packages in
Guix do work that way, though it's a pretty rare occurrence. GStreamer
is one with a legitimate excuse, for example. Other than that, *all*
"dependencies" (actually inputs) are present at build time, so it makes
no sense to distinguish between build time and run time. Guix knows
which packages it can delete from the store by tracking references.
What Guix needs to distinguish is whether the package is invoked at
build time (native-inputs) or whether it needs to be installed
alongside the package being built (propagated-inputs) against none of
the two (regular inputs).

So the next time you try to explain things to a first-timer, be clear
that native-inputs is for tools like compilers, linkers, code
generators *invoked* at build time. It will be less confusing to learn
it correctly the first time round rather than having to argue in the
mailing lists when submitting some patch. I understand that keeping
one piece of extra information in mind can be hard at times and the
temptation to simplify is always there, but in the long term no one
benefits from oversimplification.

Sorry for making you read this huge wall of text and happy hacking :)
M
M
muradm wrote on 17 Sep 2021 16:11
[PATCH v1] gnu: gtk: Move wayland-protocols to inputs.
(address . 50627@debbugs.gnu.org)
20210917141108.801-1-mail@muradm.net
I was building some packages on Guix. I figured out that
wayland-protocols was listed among propagated-inputs for gtk+ package.

wayland-protocols is not runtime dependency, so I moved it to
inputs of gtk+ package, once moved, building of other applications
that depening on gtk+ started to fail.

Investigation showed that, all .pc (pkg-config) files prepared by gtk+
package, was including:

Requires.private: ... wayland-protocols ...

Since it becomes requirement, other applications was failing with
missing dependency wayland-protocols of dependency gtk+, for instance:

-- Checking for module 'gtk+-3.0'
-- Package 'wayland-protocols', required by 'gdk-3.0', not found

While actually wayland-protocols is not even a build time dependency
of application that depends on gtk+. Advertisement of such
requirement, is a bit misleading, because one does not need it at
runtime, especially applications based on gtk.

Same change also merged upstream for both master and gtk-3-24 branch.

* gnu/packages/patches/gtk3-wayland-protocols-dependency.patch:
Upstream change
* gnu/packages/gtk.scm (gtk+): move wayland-protocols to inputs
---
gnu/packages/gtk.scm | 9 ++++----
.../gtk3-wayland-protocols-dependency.patch | 23 +++++++++++++++++++
2 files changed, 28 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/gtk3-wayland-protocols-dependency.patch

Toggle diff (65 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 24c24d5653..f164005416 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -948,7 +948,8 @@ application suites.")
(base32
"1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
(patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
- "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+ "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"
+ "gtk3-wayland-protocols-dependency.patch"))))
(propagated-inputs
`(("atk" ,atk)
("at-spi2-atk" ,at-spi2-atk)
@@ -978,8 +979,7 @@ application suites.")
("libxrender" ,libxrender)
("mesa" ,mesa)
("pango" ,pango)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland" ,wayland)))
(inputs
`(("colord" ,colord)
("cups" ,cups)
@@ -988,7 +988,8 @@ application suites.")
("iso-codes" ,iso-codes)
("json-glib" ,json-glib)
("libxml2" ,libxml2)
- ("rest" ,rest)))
+ ("rest" ,rest)
+ ("wayland-protocols" ,wayland-protocols)))
(native-inputs
`(("docbook-xml" ,docbook-xml-4.1.2)
("gettext" ,gettext-minimal)
diff --git a/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
new file mode 100644
index 0000000000..03196713bc
--- /dev/null
+++ b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
@@ -0,0 +1,23 @@
+diff --git a/configure b/configure
+index edd41ad..cb36877 100755
+--- a/configure
++++ b/configure
+@@ -23247,7 +23247,8 @@ $as_echo "no" >&6; }
+ fi
+ fi
+
+-WAYLAND_DEPENDENCIES="wayland-client >= 1.14.91 wayland-protocols >= 1.17 xkbcommon >= 0.2.0 wayland-cursor >= 1.14.91 wayland-egl"
++WAYLAND_RUNTIME_DEPENDENCIES="wayland-client >= 1.14.91 xkbcommon >= 0.2.0 wayland-cursor >= 1.14.91 wayland-egl"
++WAYLAND_DEPENDENCIES="wayland-protocols >= 1.17 $WAYLAND_RUNTIME_DEPENDENCIES"
+ if test "$enable_wayland_backend" = "maybe" ; then
+ # Extract the first word of "wayland-scanner", so it can be a program name with args.
+ set dummy wayland-scanner; ac_word=$2
+@@ -23320,7 +23321,7 @@ if test "$enable_wayland_backend" = "yes"; then
+ GDK_WINDOWING="$GDK_WINDOWING
+ #define GDK_WINDOWING_WAYLAND"
+ backend_immodules="$backend_immodules,wayland"
+- WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
++ WAYLAND_PACKAGES="$WAYLAND_RUNTIME_DEPENDENCIES"
+ # Extract the first word of "wayland-scanner", so it can be a program name with args.
+ set dummy wayland-scanner; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
--
2.33.0
M
M
muradm wrote on 17 Sep 2021 16:11
Re: [PATCH 0/2] Make wayland-protocols dependency native-input.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 50627@debbugs.gnu.org)
87bl4rdy9m.fsf@muradm.net
Apart of comments, I updated the patch, in the way that for now it
only touches gtk+ package. There are two suspect packages remain
who propagate, is wlroots, and enlightenment. enlightenment is
most
likely to remain leaf package, wlroots is different, we may look
at
it later when updating it.

Thanks in advance,
muradm

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (23 lines)
> Hi,
>
> Am Freitag, den 17.09.2021, 11:20 +0300 schrieb muradm:
>> Regardless of comments below, I understand what you are trying
>> to
>> point out. It is fine with me to use 'inputs instead of
>> 'native-
>> inputs, as the final result won't change. Just in my opinion,
>> what I
>> found it that, it need/should not be in 'propagated-inputs. I
>> will be
>> updating the patch to make sure that wayland-protocols are
>> listed
>> among 'inputs without propagating. It is also fine with me to
>> close
>> this issue and don't do anything if you say that it is
>> unnecessary, I
>> don't mind :)
> I agree that reducing propagated-inputs is a good thing, it
> should just
> be moved to inputs. When you update the patch, please do use
> the
> upstream version of gtk3-wayland-protocols-dependency.patch.
I suppose it is impossible, upstream patches are for source in
git, gtk+
package is being built from post-processed source tarball. When
patching
upstream target is configure.ac and meson.build, when patching
source
tarball, configure script it self.

[...]
Toggle quote (21 lines)
>> As with any other kind of protocol, you can implement platform
>> specific encoder/decoder, but protocol remains the same.
>> Suppose,
>> connecting from arm, to x86 or vice versa in the context of
>> wayland,
>> should protocol change? As you mentioned wayland-scanner below,
>> that
>> would be its task to interpret protocol specification in
>> platform
>> specific way. So I would speculate that in future these
>> specifications would remain the same.
>> Otherwise, that would defeat the point of having protocol.
> You are probably correct in that those files will likely stay
> the same
> for all platforms, but there could be scenarios where for the
> sake of
> performance or whatever else you might want to have some
> protocol
> extensions. Platforms that don't support those then wouldn't
> ship said
> protocol extensions.
Btw, gtk+'s native-inputs are interesting tho.. :)

[...]
Toggle quote (34 lines)
>> > > There are two things which are being changed. First as you
>> > > pointing out is the way Guix treats it, i.e. reducing
>> > > closure,
>> > > etc. Second is propagation of inputs. Currently (without
>> > > this
>> > > patch), since it is listed in propagated-inputs (and also
>> > > advertised in .pc files), wayland-protocols as requirement,
>> > > needlessly, getting pushed down then hierarchy.
>> > We ought to move it from propagated-inputs to inputs and
>> > either
>> > (if we can) ignore pkg-config or patch the pkg-config
>> > files. W.r.t. pkg-config I do wonder whether
>> > Requires.private
>> > needs propagation, though, it normally should be just
>> > Requires.
>> I suppose, it is not in Guix's hands to control how pkg-config
>> files are authored by software owners and/or interpreted by
>> build
>> tools.
>> What Guix's can do, it to fix what is already there. This patch
>> illustrates this point.
> The point of authoring is a weird one when Guix can absolutely
> still
> patch the file *and* you supplied a patch that was accepted
> upstream.
> A patch, which mind you is arguably more correct than the one
> you've
> supplied for Guix, patching the build files themselves rather
> than
> generated sources.
>
> For other packages with similar issues without an upstream fix,
> you
> could on the other hand simply substitute* the .pc file.
Please, see reason mentioned above, on why patch is different.

Toggle quote (30 lines)
>> > > Let's take 4 cases that we have here (I do not pretend to
>> > > be
>> > > complete, of course, there are might be more
>> > > levels/combinations,
>> > > just attempting to illustrate current case in
>> > > simple words/terms):
>> > >
>> > > 1. wayland compositor (weston, wlroots/sway, etc.)
>> > > 2. wayland client application (grim, mpv, etc. applications
>> > > directly interacting with wayland interfaces)
>> > > 3. wayland client library (qt or gtk+ in this case, also
>> > > directly
>> > > interacts with wayland to abstract it for user
>> > > applications)
>> > > 4. user application of wayland client library (in this case
>> > > some
>> > > gtk+ based application)
>> > >
>> > > For 1 and 2, both types should have to specify wayland in
>> > > inputs (or propagated-inputs), and wayland-protocols in
>> > > native-
>> > > inputs.
>> > Why?
>> One implements the protocol, the other uses it. I.e. both need
>> stubs generated from specification to agree. Which is not the
>> case
>> for anything beyond 4. Otherwise, we would defeat whole point
>> of
>> introducing abstractions.
> This still doesn't explain the *native*-inputs assertion.
As you point out below: "... the package is invoked at build time
(native-inputs) ...", in cases 1, 2 and 3 above, wayland-protocols
package is needed once, when 1, 2 or 3 target is being built. No
other
time wayland-protocols package is needed. This is the reason why I
decided initially to keep it in (native-inputs), because
definition
of (native-inputs) as you explaining in this conversation and as
explained in Guix manual, best matches with nature of
wayland-protocols, at least in my understanding :)

Toggle quote (35 lines)
>> > > One of purposes to have layer 3, is to abstract from 1 and
>> > > 2.
>> > > i.e. when I write gtk application, as user I should not be
>> > > aware of where/how this application is going to run, via
>> > > xorg or
>> > > wayland. Then why I should be aware of
>> > > wayland/wayland-protocols
>> > > and make sure that it is provided as build input for my
>> > > application?
>> > IIUC you don't need to be aware when gtk propagates the
>> > input?
>> > It's similar to how you still need an Xorg server to test
>> > your GTK
>> > application.
>> From application using gtk stand point, it does not matter what
>> is
>> behind gtk. As you point out, of course me, as user launching
>> application, I have to provide some environment which could be
>> either xorg or wayland. But application's source should not be
>> aware of that fact.
> This and that are different matters. Application source code
> continues
> to be blissfully unaware of the fact, but the toolchains to
> build your
> application are not. Think of it like this: When you use
> pkg-config
> (or older -config binaries), they spit out a number of compiler
> and
> linker flags to supply to gcc or ld. You as the application
> programmer
> are typically unaware of those flags and their values,
> especially if
> you turn down the verbosity of your build system, but that
> doesn't mean
> they're not supplied.
I don't know about typical programmer, for me as programmer, when
I
write, I do look at every dependency and how it is included. This
case
just make uncomfortable when there is dependency which is required
but unused.

[...]
Toggle quote (69 lines)
>> I understand what you are saying, however as far as I am aware,
>> people being or not on the same page, tend to use simpler
>> definitions
>> for referencing something. I was assuming that in this mailing
>> list
>> we are on the same page, and free to choose to how reference
>> things.
>> I suppose it would be fine to say "not runtime dependency",
>> "build
>> time" or "dependency for host platform when crosscompiling" in
>> reference to 'native-inputs. For instance when explaining this
>> to one
>> who sees Guix for the first time, I would say "run time" for
>> 'inputs
>> and "build time" for 'native-inputs, not mentioning
>> "crosscompiling"
>> at all on day one.
>> Any way, I believe it is more like philosophical subject, than
>> technical.
> I think it is important to acknowledge that people come from
> different
> backgrounds, and knowing that to do our best to curb
> misunderstandings.
> Comparing Guix' package definitions to other package managers
> makes it
> obvious as to why that is the case. Let me pick Gentoo ebuilds
> as an
> example (it's quicker to explain than whatever Debian has).
> There are five (as opposed to three in Guix) kinds of
> dependencies:
> - DEPEND, aka build-time dependencies,
> - RDEPEND, aka run-time dependencies,
> - BDEPEND, aka native build-time dependencies,
> - IDEPEND, aka native install-time dependenices, and
> - PDEPEND, aka what the fuck, I think I just introduced a cycle
> somewhere.
> When you say "build-time dependencies go into native inputs",
> someone
> with a shallow understanding might think that *all* build time
> dependencies are native inputs, when in fact only build time
> tools
> (i.e. BDEPEND in Gentoo parlance) would go there.
>
> In other systems, it might be acceptable to have a package
> depend on
> some other package without said dependency being present at
> build time.
> Consider a shell script that wraps youtube-dl. Since youtube-dl
> exists
> at some point between installation and first use, your shell
> script
> works™ whether or not youtube-dl is present at build. Some
> packages in
> Guix do work that way, though it's a pretty rare occurrence.
> GStreamer
> is one with a legitimate excuse, for example. Other than that,
> *all*
> "dependencies" (actually inputs) are present at build time, so
> it makes
> no sense to distinguish between build time and run time. Guix
> knows
> which packages it can delete from the store by tracking
> references.
> What Guix needs to distinguish is whether the package is invoked
> at
> build time (native-inputs) or whether it needs to be installed
> alongside the package being built (propagated-inputs) against
> none of
> the two (regular inputs).
IMHO, this kind of judgement arises from one's experience,
demands,
intuition etc. I.e. personal perception. One could just make it
working
somehow, another could have experience in what is being done,
another
could stress things to the limits. If it would be up to me, I
would put
everything into (native-inputs) and then gradually move things to
(inputs) and (propagated-inputs) as needed (of course I'm not
doing
that, I just want to show the point, that everybody's judgement is
not the same :)). From what you are saying, if it is really
requires
such level of control, I suppose that there should be a chapter in
a guide on how to measure dependencies, with examples and
reasoning
behind them, just like you mentioned GStreamer case, probably
updated
with time from discussions like this. This could help to bring
people
more or less on the same page.

Toggle quote (14 lines)
> So the next time you try to explain things to a first-timer, be
> clear
> that native-inputs is for tools like compilers, linkers, code
> generators *invoked* at build time. It will be less confusing
> to learn
> it correctly the first time round rather than having to argue in
> the
> mailing lists when submitting some patch. I understand that
> keeping
> one piece of extra information in mind can be hard at times and
> the
> temptation to simplify is always there, but in the long term no
> one
> benefits from oversimplification.
IMHO, for one it is unfair and/or unwise to treat everybody in the
same
way, there could be one who barely saw compiler (if at all), and
one
who did kernel development on embedded hardware :) I believe that,
especially with new comers, it is always depends on case by case
basis.

Toggle quote (2 lines)
> Sorry for making you read this huge wall of text and happy
> hacking :)
No issue, always good for practice, and history :)
L
L
Liliana Marie Prikler wrote on 17 Sep 2021 19:01
(name . muradm)(address . mail@muradm.net)(address . 50627@debbugs.gnu.org)
80631d7e460be6e07d5108c4fc886a8d568533e3.camel@gmail.com
Hi,

Am Freitag, den 17.09.2021, 17:11 +0300 schrieb muradm:
Toggle quote (5 lines)
> [...]
> I suppose it is impossible, upstream patches are for source in
> git, gtk+ package is being built from post-processed source tarball.
> When patching upstream target is configure.ac and meson.build, when
> patching source tarball, configure script it self.
You can simply delete the generated configure file and Guix will
bootstrap it again. So yes, you should be able to apply the upstream
patch.

Toggle quote (2 lines)
> [...]
> Btw, gtk+'s native-inputs are interesting tho.. :)
In which way?

Toggle quote (10 lines)
> [...]
> > This still doesn't explain the *native*-inputs assertion.
> As you point out below: "... the package is invoked at build time
> (native-inputs) ...", in cases 1, 2 and 3 above, wayland-protocols
> package is needed once, when 1, 2 or 3 target is being built. No
> other time wayland-protocols package is needed. This is the reason
> why I decided initially to keep it in (native-inputs), because
> definition of (native-inputs) as you explaining in this conversation
> and as explained in Guix manual, best matches with nature of
> wayland-protocols, at least in my understanding :)
This might be a bit pedantic, but *invoking* and *needing* are
different verbs, particularly in computing. So no, you're just
confused and trying to justify your confusion.

Toggle quote (24 lines)
> [...]
> > In other systems, it might be acceptable to have a package
> > depend on some other package without said dependency being present
> > at build time. Consider a shell script that wraps youtube-
> > dl. Since youtube-dl exists at some point between installation and
> > first use, your shell script works™ whether or not youtube-dl is
> > present at build. Some packages in Guix do work that way, though
> > it's a pretty rare occurrence. GStreamer is one with a legitimate
> > excuse, for example. Other than that, *all* "dependencies"
> > (actually inputs) are present at build time, so it makes
> > no sense to distinguish between build time and run time. Guix
> > knows which packages it can delete from the store by tracking
> > references. What Guix needs to distinguish is whether the package
> > is invoked at build time (native-inputs) or whether it needs to be
> > installed alongside the package being built (propagated-inputs)
> > against none of the two (regular inputs).
> IMHO, this kind of judgement arises from one's experience,
> demands, intuition etc. I.e. personal perception. One could just make
> it working somehow, another could have experience in what is being
> done, another could stress things to the limits. If it would be up to
> me, I would put everything into (native-inputs) and then gradually
> move things to (inputs) and (propagated-inputs) as needed (of course
> I'm not doing that, I just want to show the point, that everybody's
> judgement is not the same :)).
This reasoning is dangerously close to the "From my point of view" line
from a prequel to a famous space opera.

While yes, you do get an understanding of what belongs where over time,
the manual does provide guidelines that prohibit the "everything is
native" approach.

Toggle quote (6 lines)
> From what you are saying, if it is really requires such level of
> control, I suppose that there should be a chapter in a guide on how
> to measure dependencies, with examples and reasoning behind them,
> just like you mentioned GStreamer case, probably updated with time
> from discussions like this. This could help to bring people more or
> less on the same page.
GStreamer doesn't even concern the native-input vs. input dispute. It
concerns the having something as an input vs. not having it.

Toggle quote (13 lines)
> > So the next time you try to explain things to a first-timer, be
> > clear that native-inputs is for tools like compilers, linkers, code
> > generators *invoked* at build time. It will be less confusing
> > to learn it correctly the first time round rather than having to
> > argue in the mailing lists when submitting some patch. I
> > understand that keeping one piece of extra information in mind can
> > be hard at times and the temptation to simplify is always there,
> > but in the long term no one benefits from oversimplification.
> IMHO, for one it is unfair and/or unwise to treat everybody in the
> same way, there could be one who barely saw compiler (if at all),
> and one who did kernel development on embedded hardware :) I believe
> that, especially with new comers, it is always depends on case by
> case basis.
I think when it comes to the point that you're packaging software for
any distro, you ought to be able to distinguish tools from things that
are not tools. While I'm pretty sure that there are some entities out
there claiming that a bunch of XML files are a tool, I for one don't
think wayland-protocols does that.

Regards
M
M
Maxime Devos wrote on 6 Oct 2022 10:18
Re: [PATCH v1] gnu: gtk: Move wayland-protocols to inputs.
c7f1d197-084a-6def-890c-aa212886e9c9@student.kuleuven.be
Hi,

Removing a propagated input from gtk (by moving it to native-inputs)
sounds good, but I don't see the point of the inputs->native-inputs
changes.  Now I see there is a revised patch at


(albeit named v1 instead of v2).

Some comments on the new patch:

Toggle quote (12 lines)
> diff --git a/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
> new file mode 100644
> index 0000000000..03196713bc
> --- /dev/null
> +++ b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
> @@ -0,0 +1,23 @@
> +diff --git a/configure b/configure
> +index edd41ad..cb36877 100755
> +--- a/configure
> ++++ b/configure
> [...]

'configure' is generated stuff, not source code, so now the result of
"guix build --source" is missing some source code (i.e., the revisions
to configure.ac).

Proposal: modify configure.ac instead, add autotools inputs and delete
'configure' such that Guix will automatically run autoreconf, see

Greetings,
Maxime
Attachment: file
?