Commit 2c5f4ad
nix: Anchor HOL-Light shellHook to repo root, not $PWD
The holLightShellHook set PROOF_DIR (and thus IMPORTS_DIR) from $PWD,
which is whatever directory the user ran `nix develop` from. Entering
the shell from a subdirectory (e.g. proofs/cbmc/) caused PROOF_DIR to
resolve to a non-existent nested path, and the .imports/ directory
plus its `mldsa_native` / `s2n_bignum` symlinks were created under
that wrong location -- with `mldsa_native` pointing at a path that
does not exist.
Resolve the repo root via `git rev-parse --show-toplevel` (matching
the pattern already used in nix/hol_light/hol-server.sh), with a
$PWD fallback for non-git invocations, so PATH / PROOF_DIR /
IMPORTS_DIR are stable regardless of the invocation cwd.
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>1 parent 429b66a commit 2c5f4ad
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
0 commit comments