| name | sync-deps |
| description | Synchronise Nix deps hash after changing deps.edn |
Sync Dependencies Hash
Update the fixed-output derivation hash in pkgs/bits-uberjar/default.nix after
changing deps.edn.
Background
The uberjar build uses a fixed-output derivation (FOD) to cache Maven/Clojure
dependencies. When deps.edn changes, the hash becomes stale and builds fail
with a hash mismatch error containing the correct hash.
Process
-
Read pkgs/bits-uberjar/default.nix
-
Edit depsHash to an invalid value to force recomputation:
depsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
-
Run: nix build .#bits-uberjar
The build fails with a hash mismatch. Find the got: line containing the
correct hash (format: sha256-...=).
-
Edit depsHash with the correct hash from the error output.
-
Verify: nix build .#bits-uberjar
-
If verification fails, restore: git checkout pkgs/bits-uberjar/default.nix
$ARGUMENTS