diff --git a/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py b/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py index 051e1e762..598d0d69d 100644 --- a/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py +++ b/pkgs/clan-app/clan_app/deps/webview/_webview_ffi.py @@ -29,10 +29,7 @@ def _get_lib_names() -> list[str]: msg = f"Unsupported architecture: {machine}" raise RuntimeError(msg) if system == "darwin": - if machine == "arm64": - return ["libwebview.dylib"] - msg = "Not supported" - raise RuntimeError(msg) + return ["libwebview.dylib"] # linux return ["libwebview.so"] diff --git a/pkgs/clan-app/webview-lib/default.nix b/pkgs/clan-app/webview-lib/default.nix index eace975ee..812a70d22 100644 --- a/pkgs/clan-app/webview-lib/default.nix +++ b/pkgs/clan-app/webview-lib/default.nix @@ -1,6 +1,18 @@ -{ pkgs, ... }: +{ + gtk4, + webkitgtk_6_0, + lib, + clangStdenv, + fetchFromGitea, + gnumake, + cmake, + clang-tools, + pkg-config, + stdenv, + ... +}: -pkgs.clangStdenv.mkDerivation { +clangStdenv.mkDerivation { pname = "webview"; version = "nightly"; @@ -8,7 +20,7 @@ pkgs.clangStdenv.mkDerivation { # We disallow remote connections from the UI on Linux # TODO: Disallow remote connections on MacOS - src = pkgs.fetchFromGitea { + src = fetchFromGitea { domain = "git.clan.lol"; owner = "clan"; repo = "webview"; @@ -37,23 +49,19 @@ pkgs.clangStdenv.mkDerivation { ]; # Dependencies used during the build process, if any - nativeBuildInputs = with pkgs; [ + nativeBuildInputs = [ gnumake cmake clang-tools pkg-config ]; - buildInputs = - with pkgs; - [ - ] - ++ pkgs.lib.optionals stdenv.isLinux [ - webkitgtk_6_0 - gtk4 - ]; + buildInputs = lib.optionals stdenv.isLinux [ + webkitgtk_6_0 + gtk4 + ]; - meta = with pkgs.lib; { + meta = with lib; { description = "Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows)"; homepage = "https://github.com/webview/webview"; license = licenses.mit;