Packaging a PyQt app with native dependancies (Vim + QTermWidget)

I am in the process of porting a PyQt5 app from Arch to NixOS (PKGBUILD here). It uses Vim and QTermWidget as non-python dependancies, the later which is a C++ lib with optional PyQt bindings. I am not sure if they are enabled in lxqt.qtermwidget, nor how to enable them with a custom package.

The Python and Qt parts work as expected, but I need some help to enable Vim and QTermWidget.

Below is the custom package I use, where the attempts to include QTermWidget among runtime dependancies have been commented out.

{ pkgs, python3Packages }:

let primenote_src = pkgs.fetchFromGitLab {
    owner = "william.belanger";
    repo = "primenote";
    rev = "69ddaef59b3878bbad9b80167613bfa144cee2e9";
    hash = "sha256-/lfCPLt0TX0zke3thp7QeUlY8ysdjsXsgs8SbtQCDcI=";

in python3Packages.buildPythonApplication rec {
    pname = "primenote";
    version = "1.4";
    doCheck = false;
    src = primenote_src;
    #pythonPath = [ pkgs.lxqt.qtermwidget ];

    #preBuild = ''
      #export PYTHONPATH=$PYTHONPATH:${pkgs.lxqt.qtermwidget}

    #preFixup = ''
        #wrapQtApp "$out/bin/primenote" --prefix PYTHONPATH : ${pkgs.lxqt.qtermwidget}

    nativeBuildInputs = with pkgs; [

    #buildInputs = [

    propagatedBuildInputs = [

    meta = with pkgs.lib; {
      description = "Primenote";
      homepage = "";
      license = licenses.gpl3;

System infos:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.77, NixOS, 23.11 (Tapir), 23.11.4248.01885a071465`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I think that a first step would be to build a custom version of lxqt.qtermwidget, with an option override for option(QTERMWIDGET_BUILD_PYTHON_BINDING “Build python binding” ON) (see CmakeLists.txt). Could I achieve this with cmakeFlags, as in;

cmakeFlags = [

And if so, how to incorporate as a build dependency in my package? Any advice is highly welcome.