[Nix-dev] Questions about the all-packages fixpoint

Nicolas Pierron nicolas.b.pierron at nbp.name
Sun Mar 19 12:21:43 CET 2017


On Sat, Mar 18, 2017 at 7:40 PM, Benno Fünfstück
<benno.fuenfstueck at gmail.com> wrote:
> Ok, thanks again!
>
>>  - 0 hop: means that you are linking statically.  Any change of such
> dependency would cause your package to be rebuilt.
>
> Does this mean that when I link statically, I cannot go through self? so the
> following would be wrong:
>
>     foo = import foo.nix { bar = self.bar; }
>
> if `foo` links statically against `bar`?

Yes, this used to be the case, the problem is that we cannot override
statically linked libraries, so at the end I think I would split the
self-fixpoint into one fix-point for statically linking, and a second
fix-point of dynamically-linking.
Thus at the end, I expect to create an interface such as:

  {dynamicLink, staticLink}: super:

But then we would have to revise the way callPackage works in order to
distinguish statically linked dependencies versus dynamically linked
dependencies.
This would become a non-problem as soon as I manage time to answer and
push S.O.S. [1] forward, in order to get rid of callPackage.

[1] https://github.com/zimbatm/rfcs/pull/3

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/


More information about the nix-dev mailing list