all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "David Arroyo" <david@aqwari.net>
To: "Pjotr Prins" <pjotr.public12@thebird.nl>,
	"Ryan Prior" <rprior@protonmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Building a software toolchain that works
Date: Mon, 14 Mar 2022 17:40:31 -0400	[thread overview]
Message-ID: <26d5e14e-97cf-4346-a434-9e73658495b7@www.fastmail.com> (raw)
In-Reply-To: <20220314202659.oftyvymu7tjiycba@thebird.nl>

A snapshot of the guix repository is similar to a snapshot of Google's
"google3" monorepo. It differs, in that rather than containing the full
source of a specific version of every software package, it encodes
instructions on how to obtain and build a specific version of each
package. This has some tradeoffs; the size of Guix's repo is greatly
reduced, and it is easier for Guix to import new packages by simply
wrapping the build systems they already use, rather than re-implementing
the build logic with blaze/bazel. On the other hand, the decentralized
nature makes it hard for any one actor to make a breaking change. At
Google, if you want to make a breaking change in a library, you can
update all the users of that library in the same commit. I think that
this feature is actually overrated, because it is often complicated by
a need to preserve the ability to roll back a release.

With guix, I know that I am able to build every package in the
distribution, and I don't need to lookup how to use cmake or bazel
or ninja or meson or dune or whatever the author decided to use. I
don't have to figure out how to obtain and build the right versions of
C libraries that a package links to. I just use `guix build`. I think
that is a wonderful thing. Conversely, I am also free to use any build
system that's implemented in guix/build-systems.

I think guix could also greatly lower the barrier to contributing to
free software projects. Since a guix package typically encodes

* How to obtain the software
* How to build the software
* (usually) how to test the software
* (usually) its source repository

One could develop a `guix contribute <package>` subcommand or standalone
script that would implement the following workflow:

1. Obtain the source and unpack it into a writable working directory,
   skipping downstream patches and snippets.
2. Drop the user into a shell with the build and test inputs present.
   Perhaps with the scripts $PWD/.guix/test and $PWD/.guix/build added
   to run the build and test actions as needed.
3. After the user has made changes, and maybe signalled completion
   somehow, run the tests and build all outputs.
4. Once the user exits, output a diff that's suitable for git send-email.

I recently used guix to make a one-line change to the dovecot-pigeonhole
package. Initially I tried to do this without guix, and had difficulties
using autoconf/automake. So instead, I made my changes, captured them with
`git diff`, and then used the `--with-patch` option of `guix install` to
build and install the modified version. It wasn't too hard, but it could
have been easier. It may have not been worth the effort in this case for
someone new to guix, but the nice thing is I could take the same steps
to modify any piece of free software for which a guix package exists,
regardless of the build system in use.

David


  reply	other threads:[~2022-03-14 22:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 19:05 Building a software toolchain that works Ryan Prior
2022-03-14 20:26 ` Pjotr Prins
2022-03-14 21:40   ` David Arroyo [this message]
2022-03-15  8:19     ` Ludovic Courtès
2022-03-17  9:20       ` zimoun
2022-03-16 14:02     ` Josselin Poiret
2022-03-16 15:28       ` Ryan Prior
2022-03-16 20:13         ` Yasuaki Kudo
2022-03-17 15:35     ` Maxime Devos
2022-03-17 16:56       ` David Arroyo
2022-03-14 23:57   ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-03-15  8:23     ` Ludovic Courtès
2022-03-15  8:42       ` Pjotr Prins
2022-03-15 12:32       ` Yasuaki Kudo
2022-03-17 12:56     ` zimoun
2022-03-18 21:13       ` david larsson
2022-03-18 23:59         ` Yasuaki Kudo
2022-03-19 13:02         ` Windows Subsystem for Linux zimoun
2022-03-24 21:14           ` Ludovic Courtès
2022-03-25  3:43             ` Maxim Cournoyer
2022-03-25  9:04               ` Phil
2022-03-25 10:14                 ` Oliver Propst
2022-03-17 20:04   ` Building a software toolchain that works Katherine Cox-Buday
2022-03-18  6:27     ` Pjotr Prins
2022-03-18  9:10       ` Oliver Propst
  -- strict thread matches above, loose matches on Subject: below --
2022-03-17 12:06 zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26d5e14e-97cf-4346-a434-9e73658495b7@www.fastmail.com \
    --to=david@aqwari.net \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    --cc=rprior@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.