[Nix-dev] flags / configuration etc?
Marc Weber
marco-oweber at gmx.de
Sun Aug 19 16:56:14 CEST 2007
When introducing more possibilitios of configuration there is more to
test..
Do you agree this is useful nevertheless?
When having configuration flags you'll also need a way to check wether a
passed dependency is suited eg by
args: with args;
assert args.glibc.flags.nptl; stdenv.mkDerivation {
name = "wine";
...
So using my configuration proposal I would just have added all selected
features to a attr set called flags. This won't work because nix-env
will complain about a missing outpath because it treats all sets as
derivations, right?
Ways to solve this:
introduce some kind of type safety :
1) ignore sets not having outPath
2) create a new type called Derivation which is a attrSet only to
distinguish them
3) merge the flags with the derivation itself (then you even don't
have to pass them to the builder)..
This would mean that the flags and configuration stuff has to
executed not only for dependencies (which are to be installed) but
also for packages which are to be shown (which might slow down the
system a little bit)
Shall I just go for 3) and do some benchmarking?
Marc
More information about the nix-dev
mailing list