[Nix-dev] Re: Which is the best way to pass dependencies?
Andres Loeh
andres.loeh at googlemail.com
Tue May 20 21:13:19 CEST 2008
> So in this example:
>
> /nix/store/*-A/nix-support/packagdb contains contents of A
>
> variant B1:
> /nix/store/*-B/nix-support/packagdb contains contents of B
> /nix/store/*-D/nix-support/packagdb contains contents of D
> /nix/store/*-C/nix-support/packagdb contains contents of C
> E needs to know about A-D using propaged buildinputs
>
> variant B2:
> /nix/store/*-B/nix-support/packagdb contains contents of A,B
> /nix/store/*-D/nix-support/packagdb contains contents of A,D
> /nix/store/*-C/nix-support/packagdb contains contents of A,B,D,C
> E only needs to know about C, because the package db of C also contains A-D
Ah, I see. I think this isn't required though. B1 will do.
> Does the env builder script extension (to be written)
> know about propagated build inputs?
propagated build inputs are stored in nix-support, so the information
is available to the builder. But we also have propagated-user-env-packages,
and Haskell libs should make sure to set the latter to be equal to the former.
Something the generic Cabal builder can do.
> Minor question:
> Some packages contain executables (HaXmL contains Xtract)
> When should these be installed?
> In the dep graph given above if B were HaXmL should Xtract be installed
> when installing C or E ?
Interesting question. I think so, yes. Cabal's dependency mechanism is
less precise than the one of NixOS, so we'll have to approximate somewhere.
I'd not try to split packages into binary and library parts. If a package is
required to be installed into a user profile (directly or indirectly), all its
parts will be exposed to the user.
Cheers,
Andres
More information about the nix-dev
mailing list