[Top][All Lists]

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

bug#39505: Adding filesystem utilities based on file-systems

From: Ludovic Courtès
Subject: bug#39505: Adding filesystem utilities based on file-systems
Date: Mon, 10 Feb 2020 23:06:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Leo,

Leo Famulari <address@hidden> 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:

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



reply via email to

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