about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--default.nix2
-rw-r--r--nix/readTree/default.nix4
2 files changed, 3 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index 5c93e9501e10..fcd83d07ad48 100644
--- a/default.nix
+++ b/default.nix
@@ -20,7 +20,7 @@ let
   # Create a readTree filter disallowing access to the specified
   # top-level folder in other parts of the depot, except for specific
   # exceptions specified by their (full) paths.
-  restrictFolder = { folder, exceptions ? [], reason }: args: parts:
+  restrictFolder = { folder, exceptions ? [], reason }: parts: args:
     if (elemAt parts 0) == folder || elem parts exceptions
     then args
     else args // {
diff --git a/nix/readTree/default.nix b/nix/readTree/default.nix
index 2746d8c9076d..c3955c6c884e 100644
--- a/nix/readTree/default.nix
+++ b/nix/readTree/default.nix
@@ -64,7 +64,7 @@ let
   in
     if pathType != "lambda"
     then builtins.throw "readTree: trying to import ${toString path}, but it’s a ${pathType}, you need to make it a function like { depot, pkgs, ... }"
-    else importedFile (filter (argsWithPath args parts) parts);
+    else importedFile (filter parts (argsWithPath args parts));
 
   nixFileName = file:
     let res = match "(.*)\\.nix" file;
@@ -129,7 +129,7 @@ in {
   __functor = _:
     { path
     , args
-    , filter ? (x: _parts: x)
+    , filter ? (_parts: x: x)
     , scopedArgs ? {} }:
       readTree {
         inherit args scopedArgs;