-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi, I found a procedure like this (then at the top of my system
config.scm's) to be quite useful:

diff --git a/gnu/packages.scm b/gnu/packages.scm
index fb27738..63500ab 100644
- --- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -228,6 +228,14 @@ decreasing version order."
                     matching)
             matching)))))

+(define (find-guix-packages list-of-names)
+  (map
+   car
+   (map
+    find-packages-by-name
+    list-of-names)))
+
+
 (define find-newest-available-packages
   (memoize
    (lambda ()


Which could be used in the config like this (for example):

;; Globally-installed packages.
  (packages
   (append
    (find-guix-packages
     '("htop"
       "wget"
       "xmonad"
       "openssh"
       "dmenu"
       "git"
       "xterm"
       "emacs"))
    %base-packages))

and which saves the user from manually entering the use-modules for
the module packages at the top of the config.

I am aware that is maybe still too simplistic. E.g.: It might be good
to check if the name is ambiguous instead of just taking the first
result and throw an error in that case.

As a typical programmer I am allergic to seemingly redundant and
automatable tasks, so I'd love to see something at least similar in
spirit in guix.

Thoughts?

Regards,
Flo


- -- 
https://fps.io
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWREv5AAoJEA5f4Coltk8Zd10H+wQTkueXnBzYYpPtVNaXRveE
auyz9KXzcBDWw9vBSMnJjup3vG8bLIpniqQBjhTM1s29h60Z4bN/BNBq3Hnmee9s
Fec0pRqIL2tcbenP4hIov56nfxjgg7hDp9ZCKZ/VBy5ROGArc4OLiiaMuaZxiB1N
ph4uR4JDnm+YAWavv3DOBFn4czFhQSokTmW6uPdq5pgJznqP6FtV/fR281eQO65K
1ZnkCRxYiVwVlm+wfg9dCGORm1hu+qXwwzUkIGJ4F09IIVQUwoItzHjDcOHGs+Db
h4ltuNlvX4mUUB8NQO2tC/dWIGCAXX8SBvTJXIEN3wzzG4G6PO84aycU37zVvY4=
=7PjJ
-----END PGP SIGNATURE-----

Reply via email to