diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2024-11-25 14:30:28 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-12-01 20:14:15 +0100 |
| commit | 4b5dae8defe4c0d5e98b5ce6abba853007485f23 (patch) | |
| tree | aa400c2eb90fc7a7d929f2c25c6daea00705133b /gnu | |
| parent | a6334223719bf6b2695d2dc0e75dbfe69e901bd7 (diff) | |
packages: Factorize ‘all-packages’.
* gnu/packages.scm (all-packages): New procedure.
* etc/source-manifest.scm (all-packages): Remove.
* guix/scripts/graph.scm (all-packages): Remove.
* guix/scripts/refresh.scm (all-packages): Remove.
* guix/scripts/weather.scm (all-packages): Remove.
Change-Id: I6072952c4b877b541037ce86402cfb7744eeb0a0
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages.scm | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm index 80c22d1d7f5..1af3b8d440a 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2020, 2022-2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012-2020, 2022-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com> @@ -56,6 +56,7 @@ cache-is-authoritative? fold-packages + all-packages fold-available-packages find-newest-available-packages @@ -253,6 +254,23 @@ is guaranteed to never traverse the same package twice." init modules)) +(define all-packages + (mlambda () + "Return the list of all public packages, including replacements and hidden +packages, excluding superseded packages." + (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?))) + (define %package-cache-file ;; Location of the package cache. "/lib/guix/package.cache") |
