Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Add PyQt5 Bindings for NixOS package #533

Open
willbelr opened this issue Feb 26, 2024 · 0 comments
Open

[Request] Add PyQt5 Bindings for NixOS package #533

willbelr opened this issue Feb 26, 2024 · 0 comments

Comments

@willbelr
Copy link
Contributor

willbelr commented Feb 26, 2024

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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant