> to see wether there is any exception?
> You don't have to realise it. Wating till the .drv appears is enough.

perl support hasn't been enabled for subversion causing the assertion
failure causing git not showing up in nix-env -p ...

We've had this discussion multiple times.
But I think its time to discuss a solution that satisfies everyone.

I can think of

git = mkDerivation { ...
  buildInputs = optional subversionSupport (subversion.merge enablePerl);
  ..
}

  where enablePerl is using something like
  overridableDelayableArgs so that you can implement enablePerl in
  this way:
enablePerl = x :
  if x.perlSupport then x
  else trace "warning: enabling perl support in subversion for you 
automatically !"
             x // { perlSupport = true; };

Of course this enabling could be made optional.

For example we can introduce a new option in .nixpkgs/config.nix:

{
  enableDepsAutomatically = true; # false | warn ?
  # false: abort if you haven't enabled some flags on depending packages.
  # true: silently enable additional required flags (this can result in
  #        multiple store paths)
  # "warn":  same as true but also print a warning using builtins.trace
}

Of course using overridableDelayableArgs is only one (convinient) way to
implement this. In pracise this would lead to another function which
could be called requireDepFlag or such:

  buildInputs = optional subversionSupport (subversion.merge enablePerl);

would become

  buildInputs = optional subversionSupport (subversion.merge (requireDepFlag 
"perlSupport" true));

or such.

If you couldn't follow this mail let me know. I'll try to explain it in
more detail then.

Sincerly
Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to