Any ideas about why derivations were missing in the first place? I’ve looked at garbage collection settings and they aren’t seem to be relevant to the problem.
I assume this is not vulnix’s fault but I wonder if other people who use vulnix come across this missing .drv problem. Perhaps those people don’t? Or perhaps they don’t use vulnix? In which case I’d like to know what is their policy regarding security vulnerabilities? Are they using an alternative tool? (If need be I’ll start another thread).
On the one hand I’d like to introduce Nix into my company, on the other hand this does not inspire confidence. I know nix is in used in production by other companies, and that is why I’m asking.
EDIT: I found out a way to circumvent the problem that may shed some light as to the origin of the problem (still unclear to me however)
It seems that running vulnix <build-output> works even for the derivations that were before reportedly as missing. The vulnix invocation I ran before that was generating the error looks like:
vulnix -R $(nix-store -qR <build-output>) and that one stumbled upon the missing derivation.
The reason I used this invocation is that vulnix returns advisories regarding build-time dependencies deep down the build chain which adds a lot of noise to the advisories I care about more which are the run-time dependencies.
Does this shed some light as to why this is happening in the first place?
EDIT: I think I understand the reason, feel free to confirm or reject the theory:
nix-store -qR <build-output> returned run-time dependencies, some of which were taken from binary cache and with them the deriver of the binary cache was registered in my local database (this clashes with the fact that @zimbatm 's method of realizing the derivation did not work, however.
Conversely when running vulnix on directly it used my derivation file for it and from that it got all dependencies, inside which run-time dependencies are as well, through their derivations that must be on my computer since it generated them to start the build in the first place.
That is my guess, for now.