Nix language and .drv files are technically separate. I could write a new language that generates valid .drv files and build them with nix-store --realise.
However, the Nix language has no primitive (like readDerivationFromFile or importDrv) to import those .drv files into Nix expressions. This means:
-
Alternative language → .drv→ builds successfully -
Composing that .drvwith Nix packages
The Nix language can only compose derivations created by Nix itself.
Is this an intentional design choice? Are there technical reasons, or has anyone found workarounds?