Need help with setting up Andrew Gossage's Zoi powered Thanatos Native app

I am trying to build and test Andrew Gossage’s project found here, but I am having difficulty getting the css and js to load properly in the native app.
I am building and running on Nixos and I have created a nix flake that includes the following packages that are dependencies for the project:

{
  description = "Zig project with GTK+ 3.0 dependencies";

  inputs = {
    pkgs_25_05.url = "github:NixOS/nixpkgs/nixos-25.05";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, pkgs_25_05, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };
        old-pkgs = import pkgs_25_05 {inherit system;};
      in
      {
        devShells.default = pkgs.mkShell {
          packages = with pkgs; [
            sqlite
            gtk3
            # libsoup_3
            pkg-config
            fortune
          ] ++ [old-pkgs.webkitgtk_4_0];
        };
      }
    );
}

This allows the project to be built and run, but the window that opens only serves the html, no css or js.
I can access the server via the browser by navigating to localhost:8081, where the css and js are loaded, but issuing server requests through htmx only results in a response code of 500 from the server.
I am getting one warning when running the project:
(server:69553): Gtk-WARNING **: 10:36:28.844: Loading IM context type ‘xim’ failed
I am not sure where to start to debug this, because it could be in the implementation of the server, gtk or it could be that nix is not providing all needed dependencies properly.

1 Like

Hey I just pushed up an update that includes a nix flake file and updated the dependency from webkitgtk 4.0 to 4.1. Can you let me know if you are still having issues after you pull those changes?

1 Like

Ok disregard, I got it working after some additional packages and shellhook settings in the flake.nix.
These additional packages are necessary for TLS support:
glib-networking
openssl
cacert
gnutls

And these shellhook settings:
export SSL_CERT_FILE=“${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt”
export GIO_EXTRA_MODULES=“${pkgs.glib-networking.out}/lib/gio/modules”
unset GIO_USE_TLS

I am experiencing some serious performance issues with the GTK webview including stuttering and really rough scrolling, so I am going to look into that.
Also, I want to try to bring the project into the new Io conventions and use the thread pool implementation as I think it will clean up some of the threading code.

I have forked the project here and will post in the Showcase channel when I have some new progress :slight_smile: