Support setting environment variables in the inferior
When processing jobs, this is mostly to allow setting GUIX_DOWNLOAD_METHODS.
This commit is contained in:
parent
d7103eccc9
commit
31bd2156f7
5 changed files with 73 additions and 12 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
(use-modules (srfi srfi-1)
|
||||
(srfi srfi-37)
|
||||
(ice-9 match)
|
||||
(guix-data-service database)
|
||||
(guix-data-service jobs))
|
||||
|
||||
|
|
@ -49,6 +50,11 @@
|
|||
(lambda (opt name arg result)
|
||||
(alist-cons 'per-job-parallelism
|
||||
(string->number arg)
|
||||
result)))
|
||||
(option '("inferior-set-environment-variable") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'inferior-environment-variable
|
||||
(string-split arg #\=)
|
||||
result)))))
|
||||
|
||||
(define %default-options
|
||||
|
|
@ -95,6 +101,13 @@
|
|||
(* 2 (assq-ref opts 'max-processes)))
|
||||
#:skip-system-tests?
|
||||
(assq-ref opts 'skip-system-tests)
|
||||
#:extra-inferior-environment-variables
|
||||
(filter-map
|
||||
(match-lambda
|
||||
(('inferior-environment-variable key val)
|
||||
(cons key val))
|
||||
(_ #f))
|
||||
opts)
|
||||
#:per-job-parallelism
|
||||
(assq-ref opts 'per-job-parallelism)))
|
||||
(lambda _
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue