File tree 1 file changed +7
-6
lines changed
pkgs/development/tools/electron
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env nix-shell
2
- #! nix-shell -i python -p python3.pkgs.joblib python3.pkgs.click python3.pkgs.click-log nix nix-prefetch-git nix-universal-prefetch prefetch-yarn-deps prefetch-npm-deps
2
+ #! nix-shell -i python -p python3.pkgs.joblib python3.pkgs.click python3.pkgs.click-log nix nix-prefetch-git nurl prefetch-yarn-deps prefetch-npm-deps
3
3
"""
4
4
electron updater
5
5
83
83
logger = logging .getLogger (__name__ )
84
84
click_log .basic_config (logger )
85
85
86
+ nixpkgs_path = os .path .dirname (os .path .realpath (__file__ )) + "/../../../.."
86
87
87
88
class Repo :
88
89
fetcher : str
@@ -304,11 +305,11 @@ def supported_version_range() -> range:
304
305
305
306
@memory .cache
306
307
def get_repo_hash (fetcher : str , args : dict ) -> str :
307
- cmd = [ "nix-universal-prefetch" , fetcher ]
308
- for arg_name , arg in args .items ():
309
- cmd . append ( f"-- { arg_name } " )
310
- cmd . append ( arg )
311
-
308
+ expr = f'with import { nixpkgs_path } {{}}; { fetcher } {{'
309
+ for key , val in args .items ():
310
+ expr += f' { key } =" { val } ";'
311
+ expr += '}'
312
+ cmd = [ "nurl" , "-H" , "--expr" , expr ]
312
313
print (" " .join (cmd ), file = sys .stderr )
313
314
out = subprocess .check_output (cmd )
314
315
return out .decode ("utf-8" ).strip ()
You can’t perform that action at this time.
0 commit comments