From 5a675b2c67825e581cd8193f643f66c4cb1ea1e4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 3 Mar 2020 10:34:35 +0100 Subject: guix build: Allow non-package objects in manifest. * guix/scripts/build.scm (options->things-to-build)[manifest->packages]: Remove. Inline map of 'manifest-entry-item'. * tests/guix-build.sh: Add test for "guix build -m" with non-package object. --- guix/scripts/build.scm | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'guix/scripts') diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index eedf6bf6a8..5c690cb99d 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -812,14 +812,6 @@ build---packages, gexps, derivations, and so on." (for-each validate-type lst) lst)) - ;; Note: Taken from (guix scripts refresh). - (define (manifest->packages manifest) - "Return the list of packages in MANIFEST." - (filter-map (lambda (entry) - (let ((item (manifest-entry-item entry))) - (if (package? item) item #f))) - (manifest-entries manifest))) - (append-map (match-lambda (('argument . (? string? spec)) (cond ((derivation-path? spec) @@ -844,8 +836,10 @@ build---packages, gexps, derivations, and so on." (('file . file) (ensure-list (load* file (make-user-module '())))) (('manifest . manifest) - (manifest->packages - (load* manifest (make-user-module '((guix profiles) (gnu)))))) + (map manifest-entry-item + (manifest-entries + (load* manifest + (make-user-module '((guix profiles) (gnu))))))) (('expression . str) (ensure-list (read/eval str))) (('argument . (? derivation? drv)) -- cgit v1.2.3