lxqt / qtermwidget

The terminal widget for QTerminal
https://lxqt.github.io
GNU General Public License v2.0
485 stars 247 forks source link

[Request] Add PyQt5 Bindings for NixOS package #533

Open willbelr opened 4 months ago

willbelr commented 4 months ago

I am in the process of porting a PyQt5 app to NixOS. There is a package available for QTermWidget (lxqt.qtermwidget by @romildo), yet it appears that the PyQt5 bindings are missing.

Expected Behavior

Upon install, QTermWidget should be found in Python path.

Current Behavior

from QTermWidget import QTermWidget returns ImportError

Context

Below is the custom package where I tried to include QTermWidget among Python dependancies. The attempts 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; [
     qt5.wrapQtAppsHook
     python3Packages.setuptools
    ];

    #buildInputs = [
      #pkgs.lxqt.qtermwidget
      #pkgs.vim-full
    #];

    propagatedBuildInputs = [
      python3Packages.cryptography
      python3Packages.pyqt5
      python3Packages.requests
      #pkgs.lxqt.qtermwidget
    ];

    meta = with pkgs.lib; {
      description = "Primenote";
      homepage = "https://www.primenote.cc";
      license = licenses.gpl3;
  };
}
System Information
[user@system:~]$ 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`