> Referred [1] is work on one particular package, but we want to (attempt to)
> do this for almost all packages by shared code, probably by stdenv
> modification.

I'd like to say that [1] uses small library as an example of approach
to multiple outputs, but it aims to be as generic as possible. I
believe it should not be build system dependent as it is in original
multiple-output branches,but instead an analog of debhelper dh_install
should be used, where paths which go to particular output are
specified (with some sane defaults if possible) and then copied from
common build install dir. It works for simple cases very well
(separate dev,bin, and doc), but due to the way Nix generate
dependencies and multiple hacks used to make conventional programs
work with Nix (like shebang mangling, or python trickery), non trivial
post processing is needed for files when they are copied to separate
output.

multiple-output branch mentioned here relies on autotools to split
output into multiple dirs, it will cover many cases of course, but
anything using something else will be left uncovered and it is enough
to have one package to include header files to pull whole compiler and
*-dev stack into the system, basically negating all the positive
effect of merging multiple-output branch.

Back to [1], it is possible to enable it transparently to all packages
after it is mature enough, just need to change mkDerivation to
unconditionally include scatterOutputHook and set outputs, but there
is a problem I see no solution for: list of outputs is passed from top
to bottom, not other way around, so there is no way to inspect result
of $out and decide which packages this package is going to be splitted
into, therefore any attempt to magically provide reduced install size
without any cooperation from pkgs maintainers on package-to-package
basis is doomed to fail. Which is not bad at all, deb and rpm guys do
that for years after all, but it would be awesome to have it :)
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to