From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Blog: Guix packaging tutorial Date: Thu, 13 Sep 2018 13:53:16 +0200 Message-ID: <8736udk40j.fsf@elephly.net> References: <87in397jsd.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0QBy-0007yP-Fj for guix-devel@gnu.org; Thu, 13 Sep 2018 07:53:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0QBx-0005pj-7L for guix-devel@gnu.org; Thu, 13 Sep 2018 07:53:50 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g0QBw-0005lr-T2 for guix-devel@gnu.org; Thu, 13 Sep 2018 07:53:49 -0400 In-reply-to: <87in397jsd.fsf@ambrevar.xyz> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: guix-devel , guix-blog@gnu.org Hi Pierre, > I'd like to post a blog article which would serve as a packaging > tutorial. This is an excellent idea! > --8<---------------cut here---------------start------------->8--- > 0. Introduction > The perks of Guix, what it means to have a full-fledged programming > language at hand for package management (e.g. inheritance, en-masse > modifications). > > 1. General > Go through the various fields of the `package` record. > GUIX_PACKAGE_PATH, `guix build` and `guix package`. I have mixed feelings about recommending GUIX_PACKAGE_PATH to new contributors. I think that generally it is better to guide them to working on a git checkout directly, because moving packages from a separate GUIX_PACKAGE_PATH module to Guix proper isn=E2=80=99t frictionless. > Where to read about the build systems: Guix source code. The manual is probably a better place to read about the build systems (section 4.2 Build systems). > 2. Trivial build system > Provide a complete example. I would skip the trivial build system because it is rather complicated and may scare readers off. > 3. GNU build system > - Provide a complete, argument-free example. > - Provide a complete example with arguments such as extra configure/make > flags, some substitution, a snippet, etc. Sounds good! > 4. Conclusion > Further reading, more build systems, tips & tricks. > Maybe mention a few complex package declarations Maybe also mention the recursive importers to automate a large part of the work for packages from Pypi, CRAN, Bioconductor, etc. > I'm mostly wondering whether the GNU build system should be introduced > before the trivial build system: it's simpler and would let the user > have a first package ready within minutes with fewer lines of code to > understand; conversely, it also means that we would first take some > black-box systems for granted ("What the hell happens under the hood?", > might some readers wonder) which would only be explained later. In my opinion, the power of abstraction over conventional build systems is very impressive. Instead of having to write a shell snippet that does =E2=80=9C./configure --prefix=3D/foo && make && make install=E2=80=9D = you can lean back and use =E2=80=9Cgnu-build-system=E2=80=9D instead. >From there it=E2=80=99s easy to talk about packages that *don=E2=80=99t* use conventional build systems or that otherwise deviate from conventions, which is one reason for using modify-phases. Thanks for your initiative! -- Ricardo