"jgart" <[email protected]> writes:

> Hi Guixers,
>
> How would you approach writing a script that installs every Guix package 
> exhaustively for your current revision?
>
> I'm thinking of something similar to `all-packages` on PyPi but for every 
> Guix package (the whole wide ๐ŸŒŽ๏ธ).
>
> https://pypi.org/project/all-packages/


Maybe guix package -m manifest.scm:

--8<---------------cut here---------------start------------->8---
(use-modules
 (srfi srfi-1)
 (ice-9 match)
 (gnu packages)
 (guix packages))

;;; copied from guix/scripts/weather.scm.
(define (all-packages)
  "Return the list of public packages we are going to query."
  (delete-duplicates
   (fold-packages (lambda (package result)
                    (match (package-replacement package)
                      ((? package? replacement)
                       (cons* replacement package result))
                      (#f
                       (cons package result))))
                  '()

                  ;; Dismiss deprecated packages but keep hidden packages.
                  #:select? (negate package-superseded))
   eq?))

(packages->manifest (all-packages))
--8<---------------cut here---------------end--------------->8---

No idea how long it will be :)

Reply via email to