11 inherit (pythonPackages) buildPythonPackage isPy3k python sip sipbuild pyqt5 pyqt-builder;
12 in buildPythonPackage rec {
13 pname = "qscintilla-qt5";
14 version = qscintilla.version;
20 nativeBuildInputs = [ sip qmake pyqt-builder qscintilla pythonPackages.setuptools ];
21 buildInputs = [ qtbase ];
22 propagatedBuildInputs = [ pyqt5 ] ++ lib.optionals stdenv.isDarwin [ qtmacextras ];
24 dontWrapQtApps = true;
28 cp pyproject-qt5.toml pyproject.toml
29 echo '[tool.sip.project]' >> pyproject.toml
30 echo 'sip-include-dirs = [ "${pyqt5}/${python.sitePackages}/PyQt5/bindings"]' \
32 '' + lib.optionalString stdenv.isDarwin ''
33 substituteInPlace project.py \
35 "if self.project.qsci_external_lib:
36 if self.qsci_features_dir is not None:" \
37 "if self.project.qsci_external_lib:
38 self.builder_settings.append('QT += widgets')
40 self.builder_settings.append('QT += printsupport')
42 if self.qsci_features_dir is not None:"
48 sip-install --qsci-features-dir ${qscintilla}/mkspecs/features \
49 --qsci-include-dir ${qscintilla}/include \
50 --qsci-library-dir ${qscintilla}/lib --api-dir ${qscintilla}/share";
53 # Needed by pythonImportsCheck to find the module
54 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
57 # Checked using pythonImportsCheck
60 pythonImportsCheck = [ "PyQt5.Qsci" ];
63 description = "A Python binding to QScintilla, Qt based text editing control";
64 license = licenses.lgpl21Plus;
65 maintainers = with maintainers; [ lsix ];
66 homepage = "https://www.riverbankcomputing.com/software/qscintilla/";