@@ -39,7 +39,7 @@ def eval_latest_sources(args: dict, st = None):
3939 except RuntimeError as e :
4040 srcs_eval = _rsrc_fallback ('srcs' , e )
4141 else :
42- srcs_eval = args ['sources_derivation' ]
42+ srcs_eval = nix . hashify ( args ['sources_derivation' ])
4343 if args ['binaries_derivation' ] is None :
4444 try :
4545 bins_eval = nix .flake_eval (nix .EXPR_NIXIE_BINARIES )
@@ -48,17 +48,20 @@ def eval_latest_sources(args: dict, st = None):
4848 except RuntimeError as e :
4949 bins_eval = _rsrc_fallback ('bins' , e )
5050 else :
51- bins_eval = args ['binaries_derivation' ]
51+ bins_eval = nix . hashify ( args ['binaries_derivation' ])
5252 debug (f"Sources derivation: { srcs_eval } " )
5353 debug (f"Binaries derivation: { bins_eval } " )
5454 return srcs_eval , bins_eval
5555
5656def _tmplink (tdir : Path , drv : str ):
5757 locdrv = list (Path ('/nix/store/' ).glob (f'{ drv } *' ))
58+ target = tdir .joinpath (drv )
5859 if len (locdrv ) == 0 :
5960 error ('Derivation could not be found locally. Check your Internet connection and supplied derivation hash then try again.' )
6061 else :
61- tdir .joinpath ('{drv}' ).symlink_to (locdrv [0 ])
62+ target .rmdir () # fetchCachix may have left an empty dir
63+ target .symlink_to (locdrv [0 ])
64+ debug (f"Created symlink: { drv } -> { locdrv [0 ]} " )
6265
6366def prefetch_resources (tdir : Path ,
6467 feats : script .NixieFeatures ,
0 commit comments