2019-01-28 20:49:08 +01:00
|
|
|
{ lib
|
2019-02-27 22:07:30 +01:00
|
|
|
, pythonPackages
|
|
|
|
, qscintilla
|
|
|
|
, qtbase
|
|
|
|
}:
|
|
|
|
with pythonPackages;
|
2019-08-13 23:52:01 +02:00
|
|
|
buildPythonPackage {
|
2019-01-28 20:49:08 +01:00
|
|
|
pname = "qscintilla";
|
2019-02-27 22:07:30 +01:00
|
|
|
version = qscintilla.version;
|
|
|
|
src = qscintilla.src;
|
2019-01-28 20:49:08 +01:00
|
|
|
format = "other";
|
|
|
|
|
2020-06-22 12:21:19 +02:00
|
|
|
nativeBuildInputs = [ sip qtbase ];
|
|
|
|
buildInputs = [ qscintilla ];
|
|
|
|
propagatedBuildInputs = [ pyqt5 ];
|
2019-01-28 20:49:08 +01:00
|
|
|
|
2019-09-30 17:50:03 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Python/configure.py \
|
|
|
|
--replace \
|
|
|
|
"target_config.py_module_dir" \
|
|
|
|
"'$out/${python.sitePackages}'"
|
|
|
|
'';
|
|
|
|
|
2019-01-28 20:49:08 +01:00
|
|
|
preConfigure = ''
|
2020-06-22 12:21:19 +02:00
|
|
|
# configure.py will look for this folder
|
|
|
|
mkdir -p $out/share/sip/PyQt5
|
|
|
|
|
2019-01-28 20:49:08 +01:00
|
|
|
cd Python
|
2019-10-22 09:49:50 +02:00
|
|
|
substituteInPlace configure.py \
|
|
|
|
--replace "qmake = {'CONFIG': 'qscintilla2'}" "qmake = {'CONFIG': 'qscintilla2', 'QT': 'widgets printsupport'}"
|
2019-01-28 20:49:08 +01:00
|
|
|
${python.executable} ./configure.py \
|
|
|
|
--pyqt=PyQt5 \
|
2019-02-27 22:07:30 +01:00
|
|
|
--destdir=$out/${python.sitePackages}/PyQt5 \
|
|
|
|
--stubsdir=$out/${python.sitePackages}/PyQt5 \
|
2019-01-28 20:49:08 +01:00
|
|
|
--apidir=$out/api/${python.libPrefix} \
|
2019-02-27 22:07:30 +01:00
|
|
|
--qsci-incdir=${qscintilla}/include \
|
2019-09-30 17:50:03 +02:00
|
|
|
--qsci-featuresdir=${qscintilla}/mkspecs/features \
|
2019-02-27 22:07:30 +01:00
|
|
|
--qsci-libdir=${qscintilla}/lib \
|
2019-01-28 20:49:08 +01:00
|
|
|
--pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \
|
2019-02-27 22:07:30 +01:00
|
|
|
--qsci-sipdir=$out/share/sip/PyQt5 \
|
|
|
|
--sip-incdir=${sip}/include
|
2019-01-28 20:49:08 +01: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 03:11:51 +02:00
|
|
|
homepage = "https://www.riverbankcomputing.com/software/qscintilla/";
|
2019-01-28 20:49:08 +01:00
|
|
|
};
|
|
|
|
}
|