Commit 341aecd8 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

kernel: Allow downloads of local files.

Fixes #4.

* guix-jupyter-kernel.scm (handle-download): Handle the case where
'url-fetch' returns a plain file.
parent 835129b3
......@@ -363,9 +363,12 @@ HASH of type HASH-ALGO."
(mlet %store-monad
((drv (url-fetch url (string->symbol hash-algo)
hash/bv file)))
(mbegin %store-monad
(built-derivations (list drv))
(return (derivation->output-path drv))))))
(if (derivation? drv)
(mbegin %store-monad
(built-derivations (list drv))
(derivation->output-path drv)))
(return drv))))) ;plain file
(environment (proxy-state-default-environment state))
(target (lookup-proxied environment state))
(home (assq-ref (kernel-properties target) 'home)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment