[Nix-dev] Separating free and non-free packages, again
Marc Weber
marco-oweber at gmx.de
Sat Nov 21 01:16:31 CET 2009
I don't think this question is only about free / non-free.
Probably there are not so many packages (right now) so moving non-free
packages into a non-free directory is fine.
However glancing at gentoo I notice that they have overlays.
So they solved this kind of problem in a more general way.
Maybe we'll end up having such kind of overlays in the future as well
who knows?
Anyway what are the drawbacks creating
/etc/nixpkgs/nixpkgs-nonfree ?
Then you can choose to not checkout that repo and you're done.
If you just remove a directory every svn reset will bring it back, won't
it?
So before starting to move packages I'd like to see what makes having a
separate branch being a worse solution.
You could still reference nixpkgs-non-free from nixpkg-free and vice
versa if present.
nixos already utilizes nixpkgs.
Of course you have to merge those attr sets in the end.
This could look like this:
let directories = [ "./nixpkgs-free" "./nixpkgs-non-free" ] ++ getConfig ["overlays-directories"] [];
existingDirectories = filter doesDirectoryExist directories;
in mergeAttrs (map import existingDirectories);
You can reference free packages within non-free using
{ system, ... }:
free = import ./nixpkgs-free { inherit system ...; };
non-free-packgase = stdenv.mkDerivation {
buildInputs = free.gcc;
}
Then it is very easy adding support for additional repositories. Just
add another path and you're done.
Then you can add an overlay directory for all those perl / python /
haskell / ruby / .net / Java / ... packages later on.
I don't think we want every package which can be installed in nixpkgs.
Have a look at sourceforge how many packages exist..
If we start separating packages we should do it in a way which
scales in the future as well.
Marc Weber
More information about the nix-dev
mailing list