unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Leo Famulari <leo@famulari.name>
Cc: 39505@debbugs.gnu.org
Subject: bug#39505: Adding filesystem utilities based on file-systems
Date: Mon, 10 Feb 2020 23:06:55 +0100	[thread overview]
Message-ID: <87r1z2gkqo.fsf@gnu.org> (raw)
In-Reply-To: <20200208003122.GA31711@jasmine.lan> (Leo Famulari's message of "Fri, 7 Feb 2020 19:31:22 -0500")

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hi Leo,

Leo Famulari <leo@famulari.name> skribis:

> As discussed in #39332 [0], it would be great if filesystem utility
> packages were added to the system profile if a file-systems entry uses
> that filesystem type.
>
> For example, btrfs-progs could be added if a btrfs filesystem was listed
> in file-systems.

This could be done with something like:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 741 bytes --]

diff --git a/gnu/system.scm b/gnu/system.scm
index 01baa248a2..3ff3073017 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -203,7 +203,11 @@
          (default %default-issue))
 
   (packages operating-system-packages             ; list of (PACKAGE OUTPUT...)
-            (default %base-packages))             ; or just PACKAGE
+            (thunked)                             ; or just PACKAGE
+            (default (append (file-system-packages
+                              (operating-system-file-systems
+                               this-operating-system))
+                             %base-packages)))
 
   (timezone operating-system-timezone)            ; string
   (locale   operating-system-locale               ; string

[-- Attachment #3: Type: text/plain, Size: 551 bytes --]


However, this would only work for the default values of ‘packages’.  In
other cases, users would have to add (file-system-packages …) explicitly
by themselves, which is not great.

Alternately, we could turn ‘%base-packages’ into a macro that expands
to something like:

  (gimme-the-base-packages this-operating-system)

but that wouldn’t be great because now you’d be unable to refer to
‘%base-packages’ like a regular variable, outside the lexical context of
an ‘operating-system’ form.

Thoughts?

Ludo’.

  reply	other threads:[~2020-02-10 22:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08  0:31 bug#39505: Adding filesystem utilities based on file-systems Leo Famulari
2020-02-10 22:06 ` Ludovic Courtès [this message]
2020-02-20  3:31 ` Maxim Cournoyer
2020-02-20 18:37   ` Leo Famulari
2020-02-20 20:32     ` Maxim Cournoyer
2022-09-28 23:53       ` Maxim Cournoyer

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=87r1z2gkqo.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=39505@debbugs.gnu.org \
    --cc=leo@famulari.name \
    /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 public inbox

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

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).