Skip to content

Commit 97c7e18

Browse files
committed
Fix routing_info_spec: use enforce_route_policies field names
1 parent 79f9b22 commit 97c7e18

4 files changed

Lines changed: 861 additions & 3 deletions

File tree

devbox.d/mysql80/my.cnf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# MySQL configuration file
2+
3+
# [mysqld]
4+
# skip-log-bin
5+
# Change this port if 3306 is already used
6+
#port = 3306

devbox.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
3+
"packages": [
4+
"ruby@3.3",
5+
"bundler@latest",
6+
"libpq@latest",
7+
"openssl@latest",
8+
"libyaml@latest",
9+
"pkg-config@latest",
10+
"zstd@latest",
11+
"postgresql@latest"
12+
],
13+
"shell": {
14+
"init_hook": [
15+
"# Devbox installs only the default nix output (runtime libs). Native Ruby gem",
16+
"# extensions need dev headers and pkg-config files from the -dev outputs.",
17+
"# This hook reads -dev output paths from devbox.lock and adds them to the",
18+
"# compiler search paths.",
19+
"",
20+
"LIBRARY_PATH=\"$DEVBOX_PACKAGES_DIR/lib${LIBRARY_PATH:+:$LIBRARY_PATH}\"",
21+
"C_INCLUDE_PATH=\"$DEVBOX_PACKAGES_DIR/include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH}\"",
22+
"",
23+
"_devbox_realize_dev_outputs() {",
24+
" local lockfile=\"$PWD/devbox.lock\"",
25+
" [ -f \"$lockfile\" ] || return",
26+
" local arch=$(uname -m)",
27+
" local os=$(uname -s | tr '[:upper:]' '[:lower:]')",
28+
" local system=\"${arch}-${os}\"",
29+
"",
30+
" # Extract -dev and -out paths from devbox.lock using ruby (available in our shell)",
31+
" local dev_paths",
32+
" dev_paths=$(ruby -rjson -e '",
33+
" lock = JSON.parse(File.read(ARGV[0]))",
34+
" sys = ARGV[1]",
35+
" lock.fetch(\"packages\", {}).each do |_, info|",
36+
" outputs = info.dig(\"systems\", sys, \"outputs\") || []",
37+
" outputs.each do |o|",
38+
" # Include dev outputs, and also \"out\" outputs that contain includes",
39+
" puts o[\"path\"] if o[\"name\"] == \"dev\" || o[\"name\"] == \"out\"",
40+
" end",
41+
" end",
42+
" end",
43+
" ' \"$lockfile\" \"$system\" 2>/dev/null)",
44+
"",
45+
" local p",
46+
" for p in $dev_paths; do",
47+
" # Realize (download) the store path if not already present",
48+
" [ -d \"$p\" ] || nix-store --realise \"$p\" >/dev/null 2>&1 || continue",
49+
" [ -d \"$p/include\" ] && C_INCLUDE_PATH=\"${p}/include:$C_INCLUDE_PATH\"",
50+
" [ -d \"$p/lib/pkgconfig\" ] && PKG_CONFIG_PATH=\"${p}/lib/pkgconfig:${PKG_CONFIG_PATH:-}\"",
51+
" [ -d \"$p/lib\" ] && LIBRARY_PATH=\"${p}/lib:$LIBRARY_PATH\"",
52+
" done",
53+
"}",
54+
"",
55+
"_devbox_realize_dev_outputs",
56+
"export C_INCLUDE_PATH LIBRARY_PATH PKG_CONFIG_PATH",
57+
"unset -f _devbox_realize_dev_outputs",
58+
"",
59+
"# Set database connection prefix for PostgreSQL tests",
60+
"export POSTGRES_CONNECTION_PREFIX=\"postgres://postgres:supersecret@localhost:5432\"",
61+
"export DB=postgres"
62+
],
63+
"scripts": {
64+
"test": [
65+
"echo \"Error: no test specified\" && exit 1"
66+
]
67+
}
68+
}
69+
}

0 commit comments

Comments
 (0)