Parametrizable derivation builder
Usage:
nix run github:ggpeti/param-pkg myflake#lib.mkMyPkg '<arg-expr>'
Takes a textual nix expression as the final argument. myflake#lib.mkMyPkg is a function of type any -> derivation.
Uses nix eval under the hood but produces the usual result symlink in the cwd.
Hacks utilized:
- flakes don't support configurable outputs and
--argstr-> but there isnix eval --apply nix evaldoesn't instantiate derivation outputs until they are accessed ->builtins.readFileTypedoes that- lazy evaluation prevents instantiation as well -> but as is widely known, nix is eager in attrset names.