[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to remove output from inherited package?
From: |
宋文武 |
Subject: |
Re: How to remove output from inherited package? |
Date: |
Fri, 27 Dec 2024 15:34:56 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Bodertz <bodertz@gmail.com> writes:
> 宋文武 via "Development of GNU Guix and the GNU System distribution."
> <guix-devel@gnu.org> writes:
>
>> I think you should not reuse phases from transmisison, the error came
>> from '#$phases', which has reference to 'gui' output. so:
>>
>> ...
>> (inherit transmission)
>> (name "transmission-qt")
>> (outputs '("out")
>> (arguments
>> (list ...)) ; instead of 'substitute-keyword-arguments'
>> ...
>
> Hmm, you appear to be right, but I don't understand why, as I removed
> the tests that referenced the :gui output: 'move-gui, 'glib-or-gtk-wrap,
> and 'wrap-program.
>
> Do you understand it? Did I miss one?
As described in the manual (8.12 G-Expressions), gexp is used to embed
"build code" into "host code". In:
(substitute-keyword-arguments (package-arguments transmission)
((#:phases phases)
#~(modify-phases #$phases
(delete 'move-gui)
(delete 'glib-or-gtk-wrap)
(delete 'wrap-program)))))
'substitute-keywoard-arguments', 'package-arguments' and 'transmission'
will be executed by the host guile, while 'modify-phases' will be
executed by the builder of 'transmission-qt'. So in this case, the phases
have "gui" was deleted too late, if we managed to delete them before the
builder:
(substitute-keyword-arguments (package-arguments transmission)
((#:phases phases)
(modify-phases/xxx phases
(delete 'move-gui)
(delete 'glib-or-gtk-wrap)
(delete 'wrap-program)))))
That could work. But since phases of 'transmission' is a gexp object,
not a alist suitable for 'modify-phases', it not reusable now...