* Difference between guix/build and guix/build-system
@ 2024-05-11 14:45 Vasilii Smirnov
2024-05-14 9:24 ` Hartmut Goebel
2024-05-14 10:24 ` pelzflorian (Florian Pelz)
0 siblings, 2 replies; 5+ messages in thread
From: Vasilii Smirnov @ 2024-05-11 14:45 UTC (permalink / raw)
To: help-guix
I've noticed that build systems in Guix are split in two parts:
- guix/build-system/${name}.scm
- guix/build/${name}-build-system.scm
where ${name} can be "cmake", or "node", etc... So, the question is:
what's the reason for this split?
If I want to write a new build system, what code should I put in
"guix/build", and what in "guix/build-system"?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Difference between guix/build and guix/build-system
2024-05-11 14:45 Difference between guix/build and guix/build-system Vasilii Smirnov
@ 2024-05-14 9:24 ` Hartmut Goebel
2024-05-14 10:24 ` pelzflorian (Florian Pelz)
1 sibling, 0 replies; 5+ messages in thread
From: Hartmut Goebel @ 2024-05-14 9:24 UTC (permalink / raw)
To: help-guix
Am 11.05.24 um 16:45 schrieb Vasilii Smirnov:
> where ${name} can be "cmake", or "node", etc... So, the question is:
> what's the reason for this split?
For building, parts need to be "packaged" and put into the
build-environment. (Can't tell which directory is which one.)
>
> If I want to write a new build system, what code should I put in
> "guix/build", and what in "guix/build-system"?
Best is to base on an existing build system close to the one you want so
create and do like this does.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Difference between guix/build and guix/build-system
2024-05-11 14:45 Difference between guix/build and guix/build-system Vasilii Smirnov
2024-05-14 9:24 ` Hartmut Goebel
@ 2024-05-14 10:24 ` pelzflorian (Florian Pelz)
2024-05-14 14:13 ` Vasilii Smirnov
1 sibling, 1 reply; 5+ messages in thread
From: pelzflorian (Florian Pelz) @ 2024-05-14 10:24 UTC (permalink / raw)
To: Vasilii Smirnov; +Cc: help-guix
Hello Vasilii. In addition to Hartmut’s recommendation to imitate,
there also is a manual section; run
info "(guix)Source Tree Structure"
or visit
https://guix.gnu.org/manual/devel/en/html_node/Source-Tree-Structure.html
explaining what guix/build/…-build-system are:
(guix build gnu-build-system)
(guix build cmake-build-system)
(guix build pyproject-build-system)
Implementation of build systems, and in particular definition of their build phases (see Build Phases).
Regards,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Difference between guix/build and guix/build-system
2024-05-14 10:24 ` pelzflorian (Florian Pelz)
@ 2024-05-14 14:13 ` Vasilii Smirnov
2024-05-14 20:59 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 5+ messages in thread
From: Vasilii Smirnov @ 2024-05-14 14:13 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: help-guix
On 5/14/24 12:24, pelzflorian (Florian Pelz) wrote:
> Hello Vasilii. In addition to Hartmut’s recommendation to imitate,
> there also is a manual section; run
>
> info "(guix)Source Tree Structure"
>
> or visit
>
> https://guix.gnu.org/manual/devel/en/html_node/Source-Tree-Structure.html
>
> explaining what guix/build/…-build-system are:
>
> (guix build gnu-build-system)
> (guix build cmake-build-system)
> (guix build pyproject-build-system)
>
> Implementation of build systems, and in particular definition of their build phases (see Build Phases).
>
> Regards,
> Florian
Oh, nice, I completely missed that page. Thanks! Although it would be
nice if it went into more detail... Like, I see that both "build" and
"build-system" parts define the "${name}-build" function (e.g.
cmake-build). But the definitions are different.
The way I interpret these docs is that everything in the "build" part is
solely for use from inside of gexps? And the "build-system" part is for
use by the host code, that embeds these gexps. That would explain
duplicate function names then...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Difference between guix/build and guix/build-system
2024-05-14 14:13 ` Vasilii Smirnov
@ 2024-05-14 20:59 ` pelzflorian (Florian Pelz)
0 siblings, 0 replies; 5+ messages in thread
From: pelzflorian (Florian Pelz) @ 2024-05-14 20:59 UTC (permalink / raw)
To: Vasilii Smirnov; +Cc: help-guix
Hi,
Vasilii Smirnov <vasilii.smirnov@mailbox.org> writes:
> Oh, nice, I completely missed that page. Thanks! Although it would be
> nice if it went into more detail... Like, I see that both "build" and
> "build-system" parts define the "${name}-build" function
> (e.g. cmake-build). But the definitions are different.
>
> The way I interpret these docs is that everything in the "build" part
> is solely for use from inside of gexps?
Almost, there are exceptions like guix/build/syscalls.scm.
> And the "build-system" part is
> for use by the host code, that embeds these gexps. That would explain
> duplicate function names then...
I don’t know well; in the case of cmake-build, I guess so. Note
however: The proper term is build-side code. Gexps are an example of
build-side code, but phases are older than gexps and are build-side code
too. guix/build-system/cmake.scm is older than gexps, but uses gexps
now.
Regards,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-14 21:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-11 14:45 Difference between guix/build and guix/build-system Vasilii Smirnov
2024-05-14 9:24 ` Hartmut Goebel
2024-05-14 10:24 ` pelzflorian (Florian Pelz)
2024-05-14 14:13 ` Vasilii Smirnov
2024-05-14 20:59 ` pelzflorian (Florian Pelz)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).