Subject: build-systems: inconsistent use of standard-packages

From: Hartmut Goebel <[email-masked]>
Date: Sat, 9 Apr 2022 18:24:55 +0200

Build-systems are adding „@(standard-packages)“ inconsistently to 
„host-packages“ or „build-packages”. For one developing a new 
build-system it is not clear which is the correct form.

Some (e.g. texlive, ruby, python) add it to „host-inputs“)

          (host-inputs `(,@(if source
                               `(("source" ,source))
                               '())
                         ,@inputs
                          ;; Keep the standard inputs of 'gnu-build-system'.
                          ,@(standard-packages)))

Some add it to „build-inputs (e.g. gnu, cmake, qt):

     (build-inputs `(,@(if source
                           `(("source" ,source))
                           '())
                     ,@`(("cmake" ,cmake))
                     ,@native-inputs
                     ,@(if target
                           ;; Use the standard cross inputs of
                           ;; 'gnu-build-system'.
                           (standard-cross-packages target 'host)
                           '())
                     ;; Keep the standard inputs of 'gnu-build-system'.
                     ,@(standard-packages)))

Expected:

Either

a) review and align the code of all build-systems, or

b) add a comment to every build-system briefly explaining why in host 
resp. build-packages here,

c) document how and why to use which form.

Since as far as I've seen there is no detailed „How to write a 
build-system“, developers (well, me :-) tend to develop new 
build-systems based on existing ones. Thus (a) or (b) seem the easier 
and quicker solution.

Reproduce:

grep -A5 -B5 standard-packages guix/build-system/*.scm

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | [email-masked]               |
| www.crazy-compilers.com | compilers which you thought are impossible |