diff options
| -rw-r--r-- | doc/guix.texi | 4 | ||||
| -rw-r--r-- | guix/scripts/environment.scm | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index ccccf7b347a..71167dfdc74 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -4219,6 +4219,10 @@ only contain package inputs. | |||
| 4219 | @item --search-paths | 4219 | @item --search-paths |
| 4220 | Display the environment variable definitions that make up the | 4220 | Display the environment variable definitions that make up the |
| 4221 | environment. | 4221 | environment. |
| 4222 | |||
| 4223 | @item --system=@var{system} | ||
| 4224 | @itemx -s @var{system} | ||
| 4225 | Attempt to build for @var{system}---e.g., @code{i686-linux}. | ||
| 4222 | @end table | 4226 | @end table |
| 4223 | 4227 | ||
| 4224 | It also supports all of the common build options that @command{guix | 4228 | It also supports all of the common build options that @command{guix |
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index e2ac086f6d1..7a7664a1eac 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm | |||
| @@ -115,6 +115,8 @@ shell command in that environment.\n")) | |||
| 115 | --pure unset existing environment variables")) | 115 | --pure unset existing environment variables")) |
| 116 | (display (_ " | 116 | (display (_ " |
| 117 | --search-paths display needed environment variable definitions")) | 117 | --search-paths display needed environment variable definitions")) |
| 118 | (display (_ " | ||
| 119 | -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) | ||
| 118 | (newline) | 120 | (newline) |
| 119 | (show-build-options-help) | 121 | (show-build-options-help) |
| 120 | (newline) | 122 | (newline) |
| @@ -128,6 +130,7 @@ shell command in that environment.\n")) | |||
| 128 | (define %default-options | 130 | (define %default-options |
| 129 | ;; Default to opening a new shell. | 131 | ;; Default to opening a new shell. |
| 130 | `((exec . ,(or (getenv "SHELL") "/bin/sh")) | 132 | `((exec . ,(or (getenv "SHELL") "/bin/sh")) |
| 133 | (system . ,(%current-system)) | ||
| 131 | (substitutes? . #t) | 134 | (substitutes? . #t) |
| 132 | (max-silent-time . 3600) | 135 | (max-silent-time . 3600) |
| 133 | (verbosity . 0))) | 136 | (verbosity . 0))) |
| @@ -162,6 +165,10 @@ shell command in that environment.\n")) | |||
| 162 | (option '(#\n "dry-run") #f #f | 165 | (option '(#\n "dry-run") #f #f |
| 163 | (lambda (opt name arg result) | 166 | (lambda (opt name arg result) |
| 164 | (alist-cons 'dry-run? #t result))) | 167 | (alist-cons 'dry-run? #t result))) |
| 168 | (option '(#\s "system") #t #f | ||
| 169 | (lambda (opt name arg result) | ||
| 170 | (alist-cons 'system arg | ||
| 171 | (alist-delete 'system result eq?)))) | ||
| 165 | %standard-build-options)) | 172 | %standard-build-options)) |
| 166 | 173 | ||
| 167 | (define (pick-all alist key) | 174 | (define (pick-all alist key) |
| @@ -243,7 +250,7 @@ OUTPUT) tuples, using the build options in OPTS." | |||
| 243 | ((label item output) | 250 | ((label item output) |
| 244 | (list item output))) | 251 | (list item output))) |
| 245 | inputs) | 252 | inputs) |
| 246 | #:system (%current-system)))) | 253 | #:system (assoc-ref opts 'system)))) |
| 247 | (mbegin %store-monad | 254 | (mbegin %store-monad |
| 248 | ;; First build INPUTS. This is necessary even for | 255 | ;; First build INPUTS. This is necessary even for |
| 249 | ;; --search-paths. | 256 | ;; --search-paths. |
