Add builtins.appendContext.

A partner of builtins.getContext, useful for the same reasons.
This commit is contained in:
Shea Levy 2019-01-14 11:34:54 -05:00
parent 1d757292d0
commit b30be6b450
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
2 changed files with 61 additions and 4 deletions

View file

@ -18,5 +18,7 @@ let
};
};
legit-context = "${path}${drv.outPath}${drv.foo.outPath}${drv.drvPath}";
in builtins.getContext legit-context == desired-context
legit-context = builtins.getContext "${path}${drv.outPath}${drv.foo.outPath}${drv.drvPath}";
constructed-context = builtins.getContext (builtins.appendContext "" desired-context);
in legit-context == constructed-context