···85 # ../../pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
86 with subtest("recursive calls to doas from subprocesses should succeed"):
87 machine.succeed('doas -u test0 sh -c "doas -u test0 true"')
0000000088 '';
89 }
90)
···85 # ../../pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
86 with subtest("recursive calls to doas from subprocesses should succeed"):
87 machine.succeed('doas -u test0 sh -c "doas -u test0 true"')
88+89+ with subtest("test0 should inherit TERMINFO_DIRS from the user environment"):
90+ dirs = machine.succeed(
91+ "su - test0 -c 'doas -u root $SHELL -c \"echo \$TERMINFO_DIRS\"'"
92+ )
93+94+ if not "test0" in dirs:
95+ raise Exception(f"user profile TERMINFO_DIRS is not preserved: {dirs}")
96 '';
97 }
98)
···1-diff --git a/config/runtime.exs b/config/runtime.exs
2-index 7c9cc14..8facd05 100644
3---- a/config/runtime.exs
4-+++ b/config/runtime.exs
5-@@ -15,9 +15,7 @@ end
6- base_url = URI.parse(base_url)
7-8- if base_url.scheme not in ["http", "https"] do
9-- raise "BASE_URL must start with `http` or `https`. Currently configured as `#{
10-- System.get_env("BASE_URL")
11-- }`"
12-+ raise "BASE_URL must start with `http` or `https`. Currently configured as `#{System.get_env("BASE_URL")}`"
13- end
14-15- secret_key_base =
16-@@ -300,3 +298,5 @@ if appsignal_api_key do
17- env: env,
18- active: true
19- end
20-+
21-+config :tzdata, :data_dir, System.get_env("TZDATA_DIR", "priv")
···000000000000000000000
+1-6
pkgs/servers/web-apps/plausible/update.sh
···6#
7# * Add correct `name`/`version` field to `package.json`, otherwise `yarn2nix` fails to
8# find required dependencies.
9-# * Keep `tailwindcss` on version 2.0.1-compat (on `yarn` it will be upgraded due to the `^`).
10-# This is needed to make sure the entire build still works with `postcss-7` (needed
11-# by plausible).
12# * Adjust `file:`-dependencies a bit for the structure inside a Nix build.
13# * Update hashes for the tarball & the fixed-output drv with all `mix`-dependencies.
14# * Generate `yarn.lock` & `yarn.nix` in a temporary directory.
···29SRC="https://raw.githubusercontent.com/plausible/analytics/${latest}"
3031package_json="$(curl -qf "$SRC/assets/package.json")"
32-export fixed_tailwind_version="$(jq '.dependencies.tailwindcss' -r <<< "$package_json" | sed -e 's,^^,,g')"
3334echo "$package_json" \
35- | jq '. + {"name":"plausible","version": $ENV.latest} | .dependencies.tailwindcss = $ENV.fixed_tailwind_version' \
36 | sed -e 's,../deps/,../../tmp/deps/,g' \
37 > $dir/package.json
38···58chmod -R u+rwx "$tmp_setup_dir"
5960pushd $tmp_setup_dir/assets
61-jq < package.json '.dependencies.tailwindcss = "'"$fixed_tailwind_version"'"' | sponge package.json
62yarn
63yarn2nix > "$dir/yarn.nix"
64cp yarn.lock "$dir/yarn.lock"
···6#
7# * Add correct `name`/`version` field to `package.json`, otherwise `yarn2nix` fails to
8# find required dependencies.
0009# * Adjust `file:`-dependencies a bit for the structure inside a Nix build.
10# * Update hashes for the tarball & the fixed-output drv with all `mix`-dependencies.
11# * Generate `yarn.lock` & `yarn.nix` in a temporary directory.
···26SRC="https://raw.githubusercontent.com/plausible/analytics/${latest}"
2728package_json="$(curl -qf "$SRC/assets/package.json")"
02930echo "$package_json" \
31+ | jq '. + {"name":"plausible","version": $ENV.latest}' \
32 | sed -e 's,../deps/,../../tmp/deps/,g' \
33 > $dir/package.json
34···54chmod -R u+rwx "$tmp_setup_dir"
5556pushd $tmp_setup_dir/assets
057yarn
58yarn2nix > "$dir/yarn.nix"
59cp yarn.lock "$dir/yarn.lock"