Commit 60d39d6
Track .envrc + make postgres scripted test work on NixOS (#5)
* Track .envrc so devshell auto-loads on cd
Track the .envrc with `use flake` so contributors with direnv +
nix-direnv get the devshell automatically on cd, without having to
author .envrc themselves.
Closes #4
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Make postgres scripted test work on NixOS
zonky's bundled generic-Linux Postgres binaries can't run on NixOS, so
`sbt scripted` fails locally even though CI (Ubuntu) is fine.
The flake devshell now exports NOMAD_PG_TARBALL pointing at an XZ tar
of pkgs.postgresql (bin, lib, share). When set, the test feeds that
through a custom PgBinaryResolver and overrides unix_socket_directories
to $TMPDIR (nix postgres defaults to /run/postgresql, absent in the
sandbox). Without the env var, behaviour is unchanged — CI keeps
working as-is.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Fix misleading unix_socket_directories comment
The comment said "point it at the data dir" but the code uses the JVM
temp dir.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add Darwin systems to flake devShell outputs
Extends supportedSystems with x86_64-darwin and aarch64-darwin so macOS
contributors using nix-darwin can enter the same direnv/flake devshell.
The NOMAD_PG_TARBALL override path in the postgres scripted test is
platform-agnostic, so the same Nix-built tarball workaround works on
Darwin too (harmless there since zonky's bundled macOS binaries would
also load natively).
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ángel Felipe Blanco Guzmán <novamage@magaran.com>1 parent 5105d32 commit 60d39d6
4 files changed
Lines changed: 27 additions & 4 deletions
File tree
- sbt-plugin/src/sbt-test/nomad/clean-and-migrate-postgres/src/main/scala
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
7 | 20 | | |
8 | 21 | | |
9 | 22 | | |
| |||
0 commit comments