help-guix
[Top][All Lists]
Advanced

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

Re: About packaging documentation


From: Zelphir Kaltstahl
Subject: Re: About packaging documentation
Date: Sun, 4 Apr 2021 15:59:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/2/21 11:56 PM, Ricardo Wurmus wrote:
> Hi Zelphir,
>
>> (1) The cookbook does not even mention the guile-build-system. […]
>> I guess this is, because the cookbook tries to be generic in a way, to apply 
>> to
>> all languages, if only one uses autotools, as those are applicable to all
>> languages.
> No, you’re overthinking it :)  The cookbook is pretty short.  It started
> because blog posts eventually go stale, so having some of these useful
> blog posts updated with Guix seemed like a good idea.
>
> The cookbook is supposed to include useful tutorials, recipes, extensive
> examples — all stuff that would bloat up the reference manual or make it
> lose scope.
>
> The fact that the cookbook doesn’t mention the guile-build-system is due
> to two reasons:
>
> 1) it’s not a reference manual, but a collection of tutorials
> 2) nobody contributed a tutorial involving the guile-build-system.
>
> 1 is by design, but 2 is not.  We would certainly add a tutorial for
> simple Guile packages if someone contributed it.
I shall share my notes, if I get it working reproducibly. Until then, I am
maintaining notes at
https://notabug.org/ZelphirKaltstahl/gnu-guile-gnu-guix-packaging-guide
<https://notabug.org/ZelphirKaltstahl/gnu-guile-gnu-guix-packaging-guide>.
>> (2) The hello package example is using the gnu-build-system. I guess that 
>> means,
>> that Guix will go through the usual autotools steps, after extracting a 
>> tarball
>> or cloning a repository. However, then it would seem, that the success of the
>> installation of the package largely hinges on what is defined in the 
>> autotools
>> related files, like Makefile and such, which are part of the downloaded tar.
> Correct.  The GNU build system commonly consists of a bootstrap step,
> the execution of the configure script, followed by “make” and “make
> install”.  The gnu-build-system abstraction merely automates that and
> assumes that these things exist and are in a functional state, so that
> it can call them with certain default arguments.
>
>> Those however, are not described in the cookbook. If one is to create a 
>> package,
>> which makes use of the gnu-build-system, then a description of how to get 
>> this
>> done would be good to have. People have done it before, but documentation 
>> does
>> not capture it.
> I can understand the desire for comprehensive documentation, but I think
> that’s too far out of scope for even the cookbook.  The GNU build system
> is just very *very* common, which is why the tutorial uses the
> gnu-build-system abstraction.  It something you are bound to encounter
> when packaging non-trivial C/C++ applications.
>
> Guix has abstractions for many other build systems, such as the
> r-build-system, or the cmake-build-system.  But I think it would be
> excessive to add tutorials on how to write an R package according to
> specifications, or how to write CMakeList.txt for a cmake-using project.
>
>> Then there is another confusion: The definition you have written – Is that 
>> for
>> editing the `guile.scm` in the Guix source tree
> Not, for guile.scm but for gnu/packages/guile-xyz.scm or rather the (gnu
> package guile-xyz) module.  It works in that context because that module
> already has all the necessary imports.

Ah, OK.

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




reply via email to

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