@@ -86,7 +86,8 @@ def _nixpkgs_package_impl(repository_ctx):
86
86
fail (strFailureImplicitNixpkgs )
87
87
88
88
nix_build_path = _executable_path (
89
- "nix-build" , repository_ctx ,
89
+ repository_ctx ,
90
+ "nix-build" ,
90
91
extra_msg = "See: https://nixos.org/nix/"
91
92
)
92
93
nix_build = [nix_build_path ] + expr_args
@@ -106,7 +107,7 @@ def _nixpkgs_package_impl(repository_ctx):
106
107
107
108
# Build a forest of symlinks (like new_local_package() does) to the
108
109
# Nix store.
109
- _symlink_children (output_path , repository_ctx )
110
+ _symlink_children (repository_ctx , output_path )
110
111
111
112
112
113
_nixpkgs_package = repository_rule (
@@ -141,11 +142,11 @@ def nixpkgs_package(*args, **kwargs):
141
142
else :
142
143
_nixpkgs_package (* args , ** kwargs )
143
144
144
- def _symlink_children (target_dir , repository_ctx ):
145
+ def _symlink_children (repository_ctx , target_dir ):
145
146
"""Create a symlink to all children of `target_dir` in the current
146
147
build directory."""
147
148
find_args = [
148
- _executable_path ("find" , repository_ctx ),
149
+ _executable_path (repository_ctx , "find" ),
149
150
target_dir ,
150
151
"-maxdepth" , "1" ,
151
152
# otherwise the directory is printed as well
@@ -162,7 +163,7 @@ def _symlink_children(target_dir, repository_ctx):
162
163
_execute_error (find_res )
163
164
164
165
165
- def _executable_path (exe_name , repository_ctx , extra_msg = "" ):
166
+ def _executable_path (repository_ctx , exe_name , extra_msg = "" ):
166
167
"""Try to find the executable, fail with an error."""
167
168
path = repository_ctx .which (exe_name )
168
169
if path == None :
0 commit comments