Subject: [bug#50084] [PATCH v3] gnu: waypipe: Clean up phases and dependencies.

From: Maxime Devos <[email-masked]>
Date: Thu, 19 Aug 2021 17:24:09 +0200

Robby Zambito schreef op wo 18-08-2021 om 22:02 [-0400]:
> * gnu/packages/xdisorg.scm (waypipe)[arguments]: Remove unused
>   argument from fix-sleep-path phase.
>   [native-inputs]: Add python, coreutils.
>   [inputs]: Remove python, coreutils.
> ---
> Paul,
> 
> Thank you for the tips. I've removed the unused outputs argument, as
> well as the out variable.
> 
> I'm a bit confused as to why test dependencies are supposed to be
> native-inputs. Aren't the tests run on the target architecture, not the
> build machine architecture? And aren't native-inputs built for the build
> machine architecture?

By default, tests are never run when cross-compiling, so putting test
dependencies in 'native-inputs' works in practice.  Theoretically,
putting test dependencies in 'inputs' might be cleaner, especially
if at some point Guix supports testing cross-compiled packages
(maybe the build directory could be copied to a "worktree" output or
something, and guix could provide a command to test the cross-compiled
binaries on the machine that was cross-compiled for or something).

Nevertheless, test dependencies tend to be put in 'native-input' anyways.
This has a practical reason (*): not all build systems support
cross-compilation. E.g., the build system 'meson', used by 'glib', doesn't
support cross-compilation on 'master' (it does on 'core-updates-frozen' though),
so packages that (indirectly) have 'glib' as 'input' cannot be an 'input'.

(*) not necessarily the reason people originally had in mind. 

> I cross compiled the package for armhf-linux and aarch64-linux and it
> built and tested fine with the changes you suggested, but I also did the

Are you sure it tested?  Unless qemu transparent emulation is enabled
(see ‘Transparent Emulation with QEMU’ in the manual) that cannot happen.

Greetings,
Maxime.