unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Michael Zucchi <notzed@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: practicality of custom config
Date: Wed, 01 Jan 2020 10:34:43 +0100	[thread overview]
Message-ID: <874kxfo6z0.fsf@elephly.net> (raw)
In-Reply-To: <ef363437-1187-b880-b59b-12025270a3f7@gmail.com>


Hi,

> From the manual:
>
>    "It is also /customizable/: users can /derive/ specialized package
>    definitions from existing ones, including from the command line (see
>    Package Transformation Options
>    <https://guix.gnu.org/manual/en/html_node/Package-Transformation-Options.html#Package-Transformation-Options>).
>    "
>
>
> But in reality how practical would it be to create a system which for
> example doesn't include pulseaudio?  I'm using slackware 64and it
> provides this option so ideally I don't want guix dragging it back in.

“pulseaudio” is a good example because many packages build with its
headers without linking to it.  What’s the right thing to do here when
you want it removed?  In those cases you cannot just remove “pulseaudio”
from the inputs, which is something that the package transformations
mentioned in the manual can easily do.

> Looking through the package definitions it looks like considerable
> effort: either editing or using code to edit (aka deriving) every
> package that uses it.

The package transformations act on the whole package graph recursively,
so it would be enough to write a simple transformer once and apply it to
all leaf nodes that you reference in the list of system packages.

Of course this would mean compiling packages anew, because we don’t
offer binary substitutes for arbitrary package variants.

> This is one example but there may be other system-wide options that
> one might want to customise in a similar way to services, is there a
> mechanism for this?

Package transformers are the generic mechanism to use here, but it is
true that a feature is missing to apply a package transformer on the
*whole* system (and not just the “packages” field of a system
configuration).

Doing something smarter or context aware however cannot easily be done
automatically (as in the case where pulseaudio is needed at build time
merely for its headers but doesn’t result in linking).

--
Ricardo

      parent reply	other threads:[~2020-01-01  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 23:29 practicality of custom config Michael Zucchi
2019-12-31  9:50 ` Pierre Neidhardt
2019-12-31 23:23   ` Michael Zucchi
2020-01-01 14:54     ` Pierre Neidhardt
2020-01-01  9:34 ` Ricardo Wurmus [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=874kxfo6z0.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=help-guix@gnu.org \
    --cc=notzed@gmail.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.
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).