12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- (use-modules (srfi srfi-1) (srfi srfi-26)
- (ice-9 match) (ice-9 vlist)
- (guix packages) (guix profiles)
- (gnu packages))
- (define (all-packages)
- "Return the list of all the packages, public or private, omitting only
- superseded packages."
- (fold-packages (lambda (package lst)
- (match (package-replacement package)
- (#f (cons package lst))
- (replacement
- (append (list replacement package) lst))))
- '()
- #:select? (negate package-superseded)))
- (define (upstream-origin source)
- "Return SOURCE without any patches or snippet."
- (origin (inherit source)
- (snippet #f) (patches '())))
- (define (all-origins)
- "Return the list of origins referred to by all the packages."
- (let loop ((packages (all-packages))
- (origins '())
- (visited vlist-null))
- (match packages
- ((head . tail)
- (let ((new (remove (cut vhash-assq <> visited)
- (package-direct-sources head))))
- (loop tail (append new origins)
- (fold (cut vhash-consq <> #t <>)
- visited new))))
- (()
- origins))))
- (manifest (map (lambda (origin)
- (manifest-entry
- (name (or (origin-actual-file-name origin)
- "origin"))
- (version "0")
- (item (upstream-origin origin))))
- (all-origins)))
|