Subject: crash: guix build -S foo --with-source=bla

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 19 Sep 2017 14:09:37 +0200

The command “guix build -S guile-git --with-source=guile-git” crashes
instead of failing gracefully:

--8<---------------cut here---------------start------------->8---
rwurmus@bimsb-sys02 in code: git clone https://gitlab.com/guile-git/guile-git.git
Cloning into 'guile-git'...
remote: Counting objects: 906, done.        
remote: Compressing objects: 100% (268/268), done.        
remote: Total 906 (delta 634), reused 895 (delta 630)        
Receiving objects: 100% (906/906), 243.62 KiB | 136.00 KiB/s, done.
Resolving deltas: 100% (634/634), done.
rwurmus@bimsb-sys02 in code: cd guile-git
rwurmus@bimsb-sys02 in guile-git: git reset --hard 969514a
HEAD is now at 969514a switch to using set-pointer-finalizer!
rwurmus@bimsb-sys02 in guile-git: cd ..
rwurmus@bimsb-sys02 in code: guix build -S guile-git --with-source=guile-git
Backtrace:
           9 (primitive-load "/gnu/store/04gdnvw7k8mnpzs9ig5kwmblzvgkxm4a-guix-0.13.0-1.a6d7…")
In guix/ui.scm:
  1331:12  8 (run-guix-command _ . _)
In ice-9/boot-9.scm:
    837:9  7 (catch _ _ #<procedure 7f11d55d88c0 at guix/ui.scm:448:2 (key c)> _)
    837:9  6 (catch _ _ #<procedure 7f11d55d88d8 at guix/ui.scm:536:6 (key proc format-stri…> …)
In guix/scripts/build.scm:
   725:14  5 (_)
In guix/ui.scm:
    633:8  4 (show-what-to-build #<build-daemon 256.97 2832e10> ("/gnu/store/07g069ka7l45f…") …)
In guix/derivations.scm:
   307:18  3 (substitution-oracle #<build-daemon 256.97 2832e10> ("/gnu/store/07g069ka7l45…") …)
In srfi/srfi-1.scm:
   466:18  2 (fold #<procedure 4028de0 at guix/derivations.scm:307:24 (drv result)> () ("/g…"))
In guix/derivations.scm:
   308:38  1 (_ "/gnu/store/07g069ka7l45f91npb8qv4j1kvi0y7m7-guile-git" ())
    606:7  0 (derivation->output-paths "/gnu/store/07g069ka7l45f91npb8qv4j1kvi0y7m7-guile-git")

guix/derivations.scm:606:7: In procedure derivation->output-paths:
guix/derivations.scm:606:7: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): "/gnu/store/07g069ka7l45f91npb8qv4j1kvi0y7m7-guile-git"
rwurmus@bimsb-sys02 in code: 
--8<---------------cut here---------------end--------------->8---

-- Ricardo