diff --git a/pasta/src/eval.nix b/pasta/src/eval.nix index 6ccf2f3..25f91c7 100644 --- a/pasta/src/eval.nix +++ b/pasta/src/eval.nix @@ -1,10 +1,7 @@ { - # import (builtins.fetchTree { - # repo = "nixpkgs"; - # ref = "migrate-doc-comments"; - # owner = "hsjobeki"; - # type = "github"; - # }) {}, + # + # All these arguments can be overriden in production build + # nixpkgs ? (builtins.fetchTree { repo = "nixpkgs"; ref = "master"; diff --git a/pasta/src/tools.nix b/pasta/src/tools.nix index d23d1da..b5e5774 100644 --- a/pasta/src/tools.nix +++ b/pasta/src/tools.nix @@ -4,6 +4,7 @@ let dropBack = l: lib.reverseList (lib.drop 1 (lib.reverseList l)); + unwrapFunctor = f: f.__functor f; /* * # Returns @@ -23,7 +24,10 @@ let let lambda = if lib.isFunction parent.${name} then - builtins.lambdaMeta parent.${name} + if parent.${name} ? __functor then + builtins.lambdaMeta (unwrapFunctor parent.${name}) + else + builtins.lambdaMeta parent.${name} else null; attr = { position = builtins.unsafeGetAttrPos name parent; };