File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 17
17
from enum import Enum , auto
18
18
from urllib .parse import urlparse , urljoin , ParseResult
19
19
20
- ROOT = Path (__file__ ).parent .parent
20
+ ROOT = Path (__file__ ).parent .parent . resolve ();
21
21
LOCK_PATH = ROOT .joinpath ("repos.json.lock" )
22
22
MANIFEST_PATH = ROOT .joinpath ("repos.json" )
23
+ EVALREPO_PATH = ROOT .joinpath ("lib/evalRepo.nix" )
23
24
24
25
Url = ParseResult
25
26
@@ -214,7 +215,11 @@ def eval_repo(spec: RepoSpec, repo_path: Path) -> None:
214
215
with open (eval_path , "w" ) as f :
215
216
f .write (f"""
216
217
with import <nixpkgs> {{}};
217
- callPackages { repo_path .joinpath (spec .nix_file )} {{}}
218
+ import { EVALREPO_PATH } {{
219
+ name = "{ spec .name } ";
220
+ src = { repo_path .joinpath (spec .nix_file )} ;
221
+ inherit pkgs lib;
222
+ }}
218
223
""" )
219
224
220
225
cmd = [
@@ -229,6 +234,7 @@ def eval_repo(spec: RepoSpec, repo_path: Path) -> None:
229
234
"-I" , f"nixpkgs={ nixpkgs_path ()} " ,
230
235
"-I" , str (repo_path ),
231
236
"-I" , str (eval_path ),
237
+ "-I" , str (EVALREPO_PATH ),
232
238
] # yapf: disable
233
239
234
240
print (f"$ { ' ' .join (cmd )} " )
You can’t perform that action at this time.
0 commit comments