diff options
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/build.scm | 17 | ||||
-rw-r--r-- | guix/scripts/graph.scm | 8 | ||||
-rw-r--r-- | guix/scripts/lint.scm | 1 | ||||
-rw-r--r-- | guix/scripts/package.scm | 2 |
4 files changed, 18 insertions, 10 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 8ecd9560ed..9193ad32b2 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -204,6 +204,7 @@ options handled by 'set-build-options-from-command-line', and listed in (lambda (opt name arg result . rest) ;; XXX: Imperatively modify the search paths. (%package-module-path (cons arg (%package-module-path))) + (%patch-path (cons arg (%patch-path))) (set! %load-path (cons arg %load-path)) (set! %load-compiled-path (cons arg %load-compiled-path)) @@ -404,10 +405,16 @@ must be one of 'package', 'all', or 'transitive'~%") (define (options->things-to-build opts) "Read the arguments from OPTS and return a list of high-level objects to build---packages, gexps, derivations, and so on." - (define ensure-list - (match-lambda - ((x ...) x) - (x (list x)))) + (define (validate-type x) + (unless (or (package? x) (derivation? x) (gexp? x) (procedure? x)) + (leave (_ "~s: not something we can build~%") x))) + + (define (ensure-list x) + (let ((lst (match x + ((x ...) x) + (x (list x))))) + (for-each validate-type lst) + lst)) (append-map (match-lambda (('argument . (? string? spec)) @@ -424,8 +431,6 @@ build---packages, gexps, derivations, and so on." (ensure-list (read/eval str))) (('argument . (? derivation? drv)) drv) - (('argument . (? derivation-path? drv)) - (list )) (_ '())) opts)) diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 9255f0018a..dcc4701779 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -113,7 +113,7 @@ Dependencies may include packages, origin, and file names." (((labels things . outputs) ...) things))) ((origin? thing) - (cons (origin-patch-guile thing) + (cons (or (origin-patch-guile thing) (default-guile)) (if (or (pair? (origin-patches thing)) (origin-snippet thing)) (match (origin-patch-inputs thing) @@ -171,7 +171,9 @@ GNU-BUILD-SYSTEM have zero dependencies." (description "same as 'bag', but without the bootstrap nodes") (identifier bag-node-identifier) (label node-full-name) - (edges (lift1 bag-node-edges-sans-bootstrap %store-monad)))) + (edges (lift1 (compose (cut filter package? <>) + bag-node-edges-sans-bootstrap) + %store-monad)))) ;;; diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 338c7e827d..f296f8a00e 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -587,6 +587,7 @@ be determined." Common Platform Enumeration (CPE) name." (match name ("icecat" "firefox") ;or "firefox_esr" + ("grub" "grub2") ;; TODO: Add more. (_ name))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index c62daee9a7..d0b5abd0e2 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -151,7 +151,7 @@ GENERATIONS is a list of generation numbers." "Delete from PROFILE all the generations matching PATTERN. PATTERN must be a string denoting a set of generations: the empty list means \"all generations but the current one\", a number designates a generation, and other patterns -denote ranges as interpreted by 'matching-derivations'." +denote ranges as interpreted by 'matching-generations'." (let ((current (generation-number profile))) (cond ((not (file-exists? profile)) ; XXX: race condition (raise (condition (&profile-not-found-error |