Paste number 156837: call-with-container

Paste number 156837: call-with-container
Pasted by: civodul
When:4 years, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+3D0L
Channel:None
Paste contents:
Raw Source | XML | Display As
(use-modules (guix) (gnu build linux-container)
             (gnu packages bootstrap))

(with-store s
  (let* ((drv (package-derivation s %bootstrap-guile))
         (out (derivation->output-path drv)))
    (build-derivations s (list drv))
    (pk 'status
        (call-with-container (map (lambda (dir)
                                    `(,dir device ,dir "none" (bind-mount) #f #f))
                                  (cons out (references s out)))
          (lambda ()
            (pk 'p (getpid))
            (system* (string-append out "/bin/guile")))
          #:namespaces '(pid user mnt)))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.