Currently, we smuggle extra information in the derivation format, which methods on ParsedDerivation extract. These extra bells and whistles, like "required features", "can build locally, "will build locally", etc. post date the derivation format.
While we have to continue to work with existing ATerm serialized derivations, our in-memory representation need not be so conservative and hacky. Instead of having these methods, we should add fields to BasicDerivation storing this extra information cleanly. The hackiness would instead be moved to the ATerm parser and printer, and not leak into anything else. (The JSON format, being experimental, should also be adjusted to represent this information more nicely.)
Currently, we smuggle extra information in the derivation format, which methods on
ParsedDerivationextract. These extra bells and whistles, like "required features", "can build locally, "will build locally", etc. post date the derivation format.While we have to continue to work with existing ATerm serialized derivations, our in-memory representation need not be so conservative and hacky. Instead of having these methods, we should add fields to
BasicDerivationstoring this extra information cleanly. The hackiness would instead be moved to the ATerm parser and printer, and not leak into anything else. (The JSON format, being experimental, should also be adjusted to represent this information more nicely.)