add fallback to overrideAttrs

This commit is contained in:
figsoda 2022-11-14 09:48:28 -05:00
parent dcf5fcc402
commit dbb398b08f

View File

@ -78,7 +78,7 @@ def nix_prefetch(expr: str) -> str:
[
"nix-build",
"--expr",
f'({expr}).overrideAttrs (_: {{ outputHash = ""; outputHashAlgo = "sha256"; }})',
f'let src = {expr}; in (src.overrideAttrs or (f: src // f src)) (_: {{ outputHash = ""; outputHashAlgo = "sha256"; }})',
],
extra_env=extra_env,
check=False,