(use-modules (guix) (gnu) (ice-9 match)) (define table (make-hash-table)) (fold-packages (lambda (package result) (let ((bs (build-system-name (package-build-system package))) (arg (package-arguments package))) (match (hash-ref result bs) ((tot wo wi) (if (null? arg) (hash-set! result bs (list (1+ tot) (1+ wo) wi)) (hash-set! result bs (list (1+ tot) wo (1+ wi))))) (#f (if (null? arg) (hash-set! result bs (list 1 1 0)) (hash-set! result bs (list 1 0 1)))) (_ (format #t "Error: ~s~%" (package-name package)))) result)) table) (define fmt "~13s: ~4s = ~4s = ~4s + ~4s~%") (format #t fmt 'key 'tot 'tot 'no-arguments 'arguments) (hash-for-each-handle (lambda (kv) (match kv ((key . value) (match value ((tot wo wi) (format #t fmt key (+ wo wi) tot wo wi)))))) table)