summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/archive.scm8
-rw-r--r--guix/scripts/build.scm8
-rw-r--r--guix/scripts/environment.scm9
-rw-r--r--guix/scripts/package.scm8
-rw-r--r--guix/scripts/system.scm8
5 files changed, 31 insertions, 10 deletions
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index 29a3ad15a7..781ffc5f58 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -293,8 +293,12 @@ the input port."
(define (guix-archive . args)
(define (parse-options)
;; Return the alist of option values.
- (args-fold* (append args (environment-build-options))
- %options
+ (append (parse-options-from args)
+ (parse-options-from (environment-build-options))))
+
+ (define (parse-options-from args)
+ ;; Actual parsing takes place here.
+ (args-fold* args %options
(lambda (opt name arg result)
(leave (_ "~A: unrecognized option~%") name))
(lambda (arg result)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 76a743f0b3..26e9f42774 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -401,8 +401,12 @@ arguments with packages that use the specified source."
(define (guix-build . args)
(define (parse-options)
;; Return the alist of option values.
- (args-fold* (append args (environment-build-options))
- %options
+ (append (parse-options-from args)
+ (parse-options-from (environment-build-options))))
+
+ (define (parse-options-from args)
+ ;; Actual parsing takes place here.
+ (args-fold* args %options
(lambda (opt name arg result)
(leave (_ "~A: unrecognized option~%") name))
(lambda (arg result)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a309dfa362..c388b0c52c 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -213,8 +213,13 @@ packages."
;; Entry point.
(define (guix-environment . args)
(define (parse-options)
- (args-fold* (append args (environment-build-options))
- %options
+ ;; Return the alist of option values.
+ (append (parse-options-from args)
+ (parse-options-from (environment-build-options))))
+
+ (define (parse-options-from args)
+ ;; Actual parsing takes place here.
+ (args-fold* args %options
(lambda (opt name arg result)
(leave (_ "~A: unrecognized option~%") name))
(lambda (arg result)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 9ff4d17bf4..21dc66cb75 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -668,8 +668,12 @@ removed from MANIFEST."
(define (guix-package . args)
(define (parse-options)
;; Return the alist of option values.
- (args-fold* (append args (environment-build-options))
- %options
+ (append (parse-options-from args)
+ (parse-options-from (environment-build-options))))
+
+ (define (parse-options-from args)
+ ;; Actual parsing takes place here.
+ (args-fold* args %options
(lambda (opt name arg result arg-handler)
(leave (_ "~A: unrecognized option~%") name))
(lambda (arg result arg-handler)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index f2a25dd65a..56228601cc 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -477,8 +477,12 @@ Build the operating system declared in FILE according to ACTION.\n"))
(define (guix-system . args)
(define (parse-options)
;; Return the alist of option values.
- (args-fold* (append args (environment-build-options))
- %options
+ (append (parse-options-from args)
+ (parse-options-from (environment-build-options))))
+
+ (define (parse-options-from args)
+ ;; Actual parsing takes place here.
+ (args-fold* args %options
(lambda (opt name arg result)
(leave (_ "~A: unrecognized option~%") name))
(lambda (arg result)