[Nix-dev] Package collection problem.
Marc Weber
marco-oweber at gmx.de
Thu Feb 19 22:27:15 CET 2009
> What I am suggesting, is not introducing new names to indicates what
> is included, but only to install what you are asking, not a predefined
> set of libraries.
That's fine with me..
Just one use case (removing python interpreter) (A)
you install: python-2.5 libA libB libC
now you do nix-env -e python-2.5. What happens with libB and libC?
Should they be kept?
using a wrapper everything is gone not leaving any rubbish as soon as
you run nix-collect-garbage..
Another use case (ugrading python forgetting about some libs) (B)
you install: python-2.5 libA-1.0 libB-1.0 libC-2.0
you told me that you don't want python-2.5-libA-1.0.
So what happens when you do
nix-env -e python; nix-env -i python-2.6?
Then you'll have python-2.6 but still python-2.5 libraries installed.
Luckily they just won't show up cause python does solve this for use
cause it using site-packages/2.5 or such.
> My suggestion is to add some kinds of collection names to packages to
> tell Nix that this package extends the python installation. When Nix
> encounter collection names, it will use specific environment builders
> to build the final user environment. This way, we would be able to
> remove the stuff related to merging python libraries out of python
> library builds and out of the python interpreter compilation.
More details, please. How should such an environment builder look like ?
I mean the environment builder must be able to cope with
python-2.5 building libA libB
and
python-2.5 building libA' libB'
where libA' = libA and a patch
libB' = libB depending on libA
Anyway: How do you tell python that it should look for modules in
PATH_TO/result instead of ~/.nix-profile?
Should this work as well if you magically get some "libs" from
/etc/nixos/configuration.nix extraPackages ? (We don't get those man
pages, do we? That's inconvinient)..
You see. All those problems are gone using an *ugly* wrapper. You
install it and you know it'll work :-)
So if we extend nix somehow I'd like to allow merging of profiles
(the system profile and the user profile). I don't know yet how this
could be done. Mmh I see this doesn't make sense. What should happen if
the system administrator remove python from extraPackages ? Then the
user profile depending on it is inconsistent..
Mmhh. The solution: Don't install the interpreter at all. Let it be a
dependency by your libraries using nix-support/propagated-user-env-packages.
But bad things will happen if you intsall python25.libA and
python25.libB when not using qualified names.
Maybe the only solution is get rid of the idea installing a list of
packages but rather a tree?
python-2.5 having (libA libB)
thereby ensuring libA can't be installed using python-2.5?
Marc Weber
More information about the nix-dev
mailing list