Hi,

Christopher Baines <m...@cbaines.net> skribis:

> I thought I was beginning to understand derivations, but I've hit a
> problem I can't explain.
>
> I've got a derivation in my local store, and as far as I can work out,
> all the outputs for all the required inputs of this derivation are in
> the store as well.
>
>   scheme@(guix-user)> (use-modules (srfi srfi-1) (guix derivations))
>   scheme@(guix-user)> (define drv (read-derivation-from-file 
> "/gnu/store/mafs37vw7k65ah071p8f080c9y1y3l7n-bbmap-35.82.drv"))
>   scheme@(guix-user)> (define required-outputs (append-map 
> derivation-input-output-paths (derivation-inputs drv)))
>   scheme@(guix-user)> (define missing-outputs (remove file-exists? 
> required-outputs))
>   scheme@(guix-user)> missing-outputs
>   $1 = ()

You should use ‘valid-path?’ instead of ‘file-exists?’: it’s possible
for an item to be present in store while being “invalid”, for instance
because it’s a leftover from a failed build (with ‘-K’).

Ludo’.

Reply via email to