2019-01-28 19:49:08 +00:00
|
|
|
{ lib
|
2019-02-27 21:07:30 +00:00
|
|
|
, pythonPackages
|
|
|
|
, qscintilla
|
2019-01-28 19:49:08 +00:00
|
|
|
, lndir
|
2019-02-27 21:07:30 +00:00
|
|
|
, 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";
|
|
|
|
|
2019-02-27 21:07:30 +00:00
|
|
|
nativeBuildInputs = [ lndir sip qtbase ];
|
2019-12-21 07:26:11 +00:00
|
|
|
buildInputs = [ qscintilla pyqt5 ];
|
2019-01-28 19:49:08 +00:00
|
|
|
|
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 = ''
|
|
|
|
mkdir -p $out
|
|
|
|
lndir ${pyqt5} $out
|
|
|
|
rm -rf "$out/nix-support"
|
|
|
|
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 ];
|
|
|
|
homepage = https://www.riverbankcomputing.com/software/qscintilla/;
|
|
|
|
};
|
|
|
|
}
|