[Nix-dev] warning if trying to install a package but it fails an assert.

Marc Weber marco-oweber at gmx.de
Thu Dec 18 14:55:00 CET 2008


Hello @ll. I've been offline for 3days. Now I'm back.. :-)

> But there was no warning or message explaining what was going on. It
> would help me a lot next time I run into this if nix gave me a more
> detailed  explanation of what happened. Any chance this could be
> added?

Hi Erick,

Congratulations for having found it. I've fallen into this trap as well.
(I do no longer remember weither it did built but didn't work or wether
the assertion has already been there)..

It's right that it has been discussed before wether a package should be
rebuild only to add another option.. You already have heared about the
benefits of nix not rebuilding the package with perl support..

Anyway you're right that there should be a nice human readable error
message. I prefer errors before compilation starts over packages which
don't do anything you want (due to missing configuration options or
such)..

By the way my newest composableDerivation function (using
prepareDerivationArgs) does handle this kind of issue nicely:

git = ... {
  flags = {
    subvesrion = { assertion = subversion.perlSupport; 
  }
}

and you should get a nice error message:
                  else throw "assertion of flag ${a} of derivation ${args.name} failed"

I've posted about that composableDerivation earlier.

telling you that something has gone wrong by checking the assertion for
subversion.

I'll try to send a patch to this mailnglist soon. I've already finished
converting all my older code to make it use the new function.

I'll look into getting this fixed. Git is used by too many people and I
don't want this to happen again.

Sincerly
Marc Weber



More information about the nix-dev mailing list