mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
I usually write extensive test modules and more often than not, I want
to use something like this:
testScript = lib.mkBefore ''
... some common initialisation ...
'';
Unfortunately, the type of testScript is types.str, so right now I'm
working around this using ugly things like this:
options.testScript = lib.mkOption {
type = let
newType = types.either types.lines (types.functionTo types.lines);
in newType // {
typeMerge = lib.const newType;
};
};
While this results in roughly the same (using types.lines instead of
types.str), I should not have to do this downstream, so hereby let's
make it types.lines.
Signed-off-by: aszlig <aszlig@nix.build>