Nikita Karetnikov <nik...@karetnikov.org> skribis:

>>> 1. Should the recursion stop when ‘fixed-output-derivation?’ returns #t?
>
>> I think so.  In general fixed-output derivations are the things you
>> would like to pre-fetch; so you would typically call ‘build-derivations’
>> on these to do the actual pre-fetching.
>
> Could you show a package with a fixed-output derivation?  My current
> implementation calls itself indefinitely because the base case is never
> satisfied.

Any “origin” that has no patches/snippet is a fixed-output derivation.

But!  There was a bug in ‘fixed-output-derivation?’ (which was actually
unused until now.)  Fixed in 99e17dc:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (package-source-derivation s (package-source wget))
$12 = #<derivation 
/gnu/store/f96502xhla1k3daikjckn2zb1l17m8r5-wget-1.15.tar.xz.drv => 
/gnu/store/qz9vm8802v6pi69ci2kgnvfivrkr085r-wget-1.15.tar.xz 2d1e730>
scheme@(guile-user)> (fixed-output-derivation? $12)
$13 = #t
--8<---------------cut here---------------end--------------->8---

Thanks!

Ludo’.

Reply via email to