(use-modules (srfi srfi-1) (ice-9 match) (guix packages) (gnu packages)) (define (package+propagated-inputs package) (match (package-transitive-propagated-inputs package) (((labels packages) ...) (cons package packages)))) (define (something) (list 42 43 44)) (define (an-example) (define build (with-extensions (package+propagated-inputs (specification->package "guile-json")) (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils) (json)) (define that ;; 'something' returns a list of integers; we need to quote ;; that list: it's data, not code, that we are inserting here. '#+(something)) (define file-name (string-append #$output "/example.json")) (mkdir-p (dirname file-name)) (with-output-to-file file-name (lambda () (scm->json (list->vector that)))))))) (computed-file "example-json" build)) (manifest (list (manifest-entry (name "bang") (version "0") (item (an-example)))))