lib/trivial: drop rec
in favor of lib
fixpoint
That way each expression uses the final version of other lib.trivial declarations. For instance, when replacing `versionSuffix` with the string `"fnord"` in a lib overlay, `trivial.version` uses `"fnord"` as suffix now rather than `pre-git`.
This commit is contained in:
parent
bb7921d1d6
commit
78f5ed053a
1 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,18 @@
|
||||||
{ lib }:
|
{ lib }:
|
||||||
|
|
||||||
rec {
|
let
|
||||||
|
inherit (lib.trivial)
|
||||||
|
isFunction
|
||||||
|
isInt
|
||||||
|
functionArgs
|
||||||
|
pathExists
|
||||||
|
release
|
||||||
|
setFunctionArgs
|
||||||
|
toBaseDigits
|
||||||
|
version
|
||||||
|
versionSuffix
|
||||||
|
warn;
|
||||||
|
in {
|
||||||
|
|
||||||
## Simple (higher order) functions
|
## Simple (higher order) functions
|
||||||
|
|
||||||
|
@ -439,7 +451,7 @@ rec {
|
||||||
*/
|
*/
|
||||||
functionArgs = f:
|
functionArgs = f:
|
||||||
if f ? __functor
|
if f ? __functor
|
||||||
then f.__functionArgs or (lib.functionArgs (f.__functor f))
|
then f.__functionArgs or (functionArgs (f.__functor f))
|
||||||
else builtins.functionArgs f;
|
else builtins.functionArgs f;
|
||||||
|
|
||||||
/* Check whether something is a function or something
|
/* Check whether something is a function or something
|
||||||
|
|
Loading…
Reference in a new issue