list-packages.sh 402 B

123456789101112131415161718
  1. #!/bin/sh
  2. export COLUMNS=80
  3. moduledir="${1:-$(pwd)}"
  4. guile -L "$moduledir" \
  5. -c '
  6. (use-modules (guix discovery)
  7. (guix ui)
  8. (gnu packages)
  9. (srfi srfi-26))
  10. (define modules
  11. (fold-modules cons (list) (list "'"$moduledir"'")))
  12. (define packages
  13. (fold-packages cons (list) modules))
  14. (for-each
  15. (cute package->recutils <> (current-output-port))
  16. packages)
  17. '