mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #328976 from marius851000/fix_lemmy_ui
lemmy-ui: fix execution
This commit is contained in:
commit
133fb94cd4
2 changed files with 12 additions and 7 deletions
|
@ -51,8 +51,8 @@ in
|
|||
|
||||
with subtest("the backend starts and responds"):
|
||||
server.wait_for_open_port(${toString backendPort})
|
||||
# wait until succeeds, it just needs few seconds for migrations, but lets give it 10s max
|
||||
server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 10)
|
||||
# wait until succeeds, it just needs few seconds for migrations, but lets give it 50s max
|
||||
server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 50)
|
||||
|
||||
with subtest("the UI starts and responds"):
|
||||
server.wait_for_unit("lemmy-ui.service")
|
||||
|
@ -77,7 +77,7 @@ in
|
|||
server.execute("systemctl stop lemmy-ui.service")
|
||||
|
||||
def assert_http_code(url, expected_http_code, extra_curl_args=""):
|
||||
_, http_code = server.execute(f'curl --silent -o /dev/null {extra_curl_args} --fail --write-out "%{{http_code}}" {url}')
|
||||
_, http_code = server.execute(f'curl --location --silent -o /dev/null {extra_curl_args} --fail --write-out "%{{http_code}}" {url}')
|
||||
assert http_code == str(expected_http_code), f"expected http code {expected_http_code}, got {http_code}"
|
||||
|
||||
# Caddy responds with HTTP code 502 if it cannot handle the requested path
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
, stdenvNoCC
|
||||
, libsass
|
||||
, nodejs
|
||||
, python3
|
||||
, pkg-config
|
||||
, pnpm_9
|
||||
, fetchFromGitHub
|
||||
, nixosTests
|
||||
, vips
|
||||
, nodePackages
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -60,12 +57,20 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
# runHook postInstall
|
||||
|
||||
# '';
|
||||
preInstall = ''
|
||||
preInstall = ''
|
||||
mkdir $out
|
||||
cp -R ./dist $out
|
||||
cp -R ./node_modules $out
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
find $out -name libvips-cpp.so.42 -print0 | while read -d $'\0' libvips; do
|
||||
echo replacing libvips at $libvips
|
||||
rm $libvips
|
||||
ln -s ${lib.getLib vips}/lib/libvips-cpp.so.42 $libvips
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
distPhase = "true";
|
||||
|
||||
|
|
Loading…
Reference in a new issue