Nixpkgs Update #8

Merged
naturallaw777 merged 11 commits from staging-dev into stable 2026-06-02 11:32:45 -05:00
Showing only changes of commit 66cacaaf9d - Show all commits
+3 -1
View File
@@ -653,7 +653,7 @@ templates = Jinja2Templates(directory=os.path.join(_BASE_DIR, "templates"))
# ── Static asset cache-busting ────────────────────────────────────
def _compute_asset_version() -> str:
"""Return a stable asset version string for cache-busting template assets."""
"""Return a 16-char asset version from Nix store hash or static/template metadata."""
nix_match = re.search(r"/nix/store/([a-z0-9]{32})-", os.path.realpath(_BASE_DIR))
if nix_match:
return nix_match.group(1)[:16]
@@ -674,7 +674,9 @@ def _compute_asset_version() -> str:
except OSError:
continue
hasher.update(path.encode())
hasher.update(b"\0")
hasher.update(f"{stat.st_mtime_ns}:{stat.st_size}".encode())
hasher.update(b"\0")
return hasher.hexdigest()[:16]