help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'gu


From: Rutherther
Subject: Re: 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]'
Date: Thu, 07 Nov 2024 19:21:52 +0100

Hello,

> How do I, by the way, programmatically get from the 'guix build' list of
> (here: three) outputs to the main ("out") output?  Via

the outputs work something like this: when the package is being built
the builder scripts build everything. At the end, something
is copied to out output, something to debug output, and something to
static output.

So when you are building the package locally, you cannot just tell guix
build to produce only one of those outputs. Because the phases are
already coded in a way to produce all of them.

If you really wanted to not build them, you would have to change
the package definition itself. Specifically with gcc-toolchain it
would be quite easy as it's only sort of a wrapper package that
builds together gcc and libc. The static/debug outputs
are actually just copied outputs of those.

> (Is there a fundamental reason for not allowing that, or just not yet
> implemented?)

So yeah, there is. But sometimes substitutes will give you only
one output you request. (I am not sure what the condition is,
seems that for some build systems it's possible), this of course
applies only to packages that have substitutes and only if you use
command like guix shell / guix install.

Additionally, if you are only concerned about the size it takes up in
store, you can guix gc those paths right after the build.

Regards,
Rutherther



reply via email to

[Prev in Thread] Current Thread [Next in Thread]