drv-parts
drv-parts copied to clipboard
Could we somehow import packages from nixpkgs?
I'm wondering if we could somehow import existing package definitions from nixpkgs.
Maybe we could create another drv-parts backend that can wrap any default.nix
file from nixpkgs.
Then would make porting existing packages to drv-parts much easier.
You could get at the internals fairly reliably with drv: (drv.overrideAttrs (self: super: { passthru.__expose = { inherit self super; }; })).__expose
.
That said, such a feature is going to break for corner cases and when Nixpkgs diverges from drv-parts. Maybe it's better than nothing?
I've been hacking on the for the past two days until a point of frustration. The approach might just have been wrong. I opened a draft PR. Maybe you have some ideas.