guix build: Handle "guix build /….drv" correctly for non-existent derivations.
authorLudovic Courtès <ludo@gnu.org>
Sun, 17 Nov 2019 22:10:34 +0000 (23:10 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 17 Nov 2019 22:14:54 +0000 (23:14 +0100)
commit9c9982dc0c8c38ce3821b154b7e92509c1564317
treec1e11b91d1bd5e6f5adb836262c871b618daedd7
parent16ac74033ae9f01e8be81c4f7f1857e13545bc2f
guix build: Handle "guix build /….drv" correctly for non-existent derivations.

This lets the daemon substitute missing derivations, as in the example
at <https://bugs.gnu.org/38226>, instead of failing with ENOENT.

* guix/scripts/build.scm (options->things-to-build): In the
'derivation-path?' case, don't fail when 'read-derivation-from-file'
raises to ENOENT; return the empty list in that case.
(guix-build): Add non-existent '.drv' files to ITEMS.
Pass ITEMS in addition to DRV to 'build-derivations'.
* tests/guix-build.sh: Add test.
guix/scripts/build.scm
tests/guix-build.sh