Unverified Commit 133fb94c authored by Yt's avatar Yt Committed by GitHub
Browse files

Merge pull request #328976 from marius851000/fix_lemmy_ui

lemmy-ui: fix execution
parents 8f70f310 efde7f61
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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
+9 −4
Original line number Diff line number Diff line
@@ -2,13 +2,10 @@
, stdenvNoCC
, libsass
, nodejs
, python3
, pkg-config
, pnpm_9
, fetchFromGitHub
, nixosTests
, vips
, nodePackages
}:

let
@@ -66,6 +63,14 @@ stdenvNoCC.mkDerivation (finalAttrs: {
    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";