File tree 1 file changed +9
-2
lines changed
1 file changed +9
-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,12 @@ 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
+ url = "{ spec .url } ";
221
+ src = { repo_path .joinpath (spec .nix_file )} ;
222
+ inherit pkgs lib;
223
+ }}
218
224
""" )
219
225
220
226
cmd = [
@@ -229,6 +235,7 @@ def eval_repo(spec: RepoSpec, repo_path: Path) -> None:
229
235
"-I" , f"nixpkgs={ nixpkgs_path ()} " ,
230
236
"-I" , str (repo_path ),
231
237
"-I" , str (eval_path ),
238
+ "-I" , str (EVALREPO_PATH ),
232
239
] # yapf: disable
233
240
234
241
print (f"$ { ' ' .join (cmd )} " )
You can’t perform that action at this time.
0 commit comments