Skip to content

[Request] Add PyQt5 Bindings for NixOS package #533

@willbelr

Description

@willbelr

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
  • python311Packages.pyqt5 Version: 5.15.9
  • lxqt-build-tools Version: 0.13.0
  • lxqt.qtermwidget version: 1.4.0
[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`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions