2019-01-28 19:49:08 +00:00
|
|
|
{ lib
|
2019-02-27 21:07:30 +00:00
|
|
|
, pythonPackages
|
|
|
|
, qscintilla
|
|
|
|
, qtbase
|
|
|
|
}:
|
|
|
|
with pythonPackages;
|
2019-08-13 22:52:01 +01:00
|
|
|
buildPythonPackage {
|
2019-01-28 19:49:08 +00:00
|
|
|
pname = "qscintilla";
|
2019-02-27 21:07:30 +00:00
|
|
|
version = qscintilla.version;
|
|
|
|
src = qscintilla.src;
|
2019-01-28 19:49:08 +00:00
|
|
|
format = "other";
|
|
|
|
|
2020-06-22 11:21:19 +01:00
|
|
|
nativeBuildInputs = [ sip qtbase ];
|
|
|
|
buildInputs = [ qscintilla ];
|
|
|
|
propagatedBuildInputs = [ pyqt5 ];
|
2019-01-28 19:49:08 +00:00
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2019-09-30 16:50:03 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Python/configure.py \
|
|
|
|
--replace \
|
|
|
|
"target_config.py_module_dir" \
|
|
|
|
"'$out/${python.sitePackages}'"
|
|
|
|
'';
|
|
|
|
|
2019-01-28 19:49:08 +00:00
|
|
|
preConfigure = ''
|
2020-06-22 11:21:19 +01:00
|
|
|
# configure.py will look for this folder
|
|
|
|
mkdir -p $out/share/sip/PyQt5
|
|
|
|
|
2019-01-28 19:49:08 +00:00
|
|
|
cd Python
|
2019-10-22 08:49:50 +01:00
|
|
|
substituteInPlace configure.py \
|
|
|
|
--replace "qmake = {'CONFIG': 'qscintilla2'}" "qmake = {'CONFIG': 'qscintilla2', 'QT': 'widgets printsupport'}"
|
2019-01-28 19:49:08 +00:00
|
|
|
${python.executable} ./configure.py \
|
|
|
|
--pyqt=PyQt5 \
|
2019-02-27 21:07:30 +00:00
|
|
|
--destdir=$out/${python.sitePackages}/PyQt5 \
|
|
|
|
--stubsdir=$out/${python.sitePackages}/PyQt5 \
|
2019-01-28 19:49:08 +00:00
|
|
|
--apidir=$out/api/${python.libPrefix} \
|
2019-02-27 21:07:30 +00:00
|
|
|
--qsci-incdir=${qscintilla}/include \
|
2019-09-30 16:50:03 +01:00
|
|
|
--qsci-featuresdir=${qscintilla}/mkspecs/features \
|
2019-02-27 21:07:30 +00:00
|
|
|
--qsci-libdir=${qscintilla}/lib \
|
2019-01-28 19:49:08 +00:00
|
|
|
--pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \
|
2019-02-27 21:07:30 +00:00
|
|
|
--qsci-sipdir=$out/share/sip/PyQt5 \
|
|
|
|
--sip-incdir=${sip}/include
|
2019-01-28 19:49:08 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python binding to QScintilla, Qt based text editing control";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ lsix ];
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.riverbankcomputing.com/software/qscintilla/";
|
2019-01-28 19:49:08 +00:00
|
|
|
};
|
|
|
|
}
|