Skip to content

ggPeti/param-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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:

  1. flakes don't support configurable outputs and --argstr -> but there is nix eval --apply
  2. nix eval doesn't instantiate derivation outputs until they are accessed -> builtins.readFileType does that
  3. lazy evaluation prevents instantiation as well -> but as is widely known, nix is eager in attrset names.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages