2017-01-03 05:43:16 +00:00
|
|
|
{ stdenv, fetchurl, unzip
|
2017-01-03 05:33:42 +00:00
|
|
|
, qt4 ? null, qmake4Hook ? null
|
2017-06-02 16:40:19 +01:00
|
|
|
, withQt5 ? false, qtbase ? null, qmake ? null
|
2017-01-03 05:33:42 +00:00
|
|
|
}:
|
2014-08-20 23:41:41 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qscintilla";
|
2017-01-03 05:43:16 +00:00
|
|
|
version = "2.9.4";
|
2014-08-20 23:41:41 +01:00
|
|
|
|
2017-01-03 05:33:42 +00:00
|
|
|
name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${version}";
|
2014-08-20 23:41:41 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-01-03 05:43:16 +00:00
|
|
|
url = "mirror://sourceforge/pyqt/QScintilla2/QScintilla-${version}/QScintilla_gpl-${version}.zip";
|
|
|
|
sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi";
|
2014-08-20 23:41:41 +01:00
|
|
|
};
|
|
|
|
|
2017-01-03 05:33:42 +00:00
|
|
|
buildInputs = if withQt5 then [ qtbase ] else [ qt4 ];
|
2017-06-02 16:40:19 +01:00
|
|
|
nativeBuildInputs = [ unzip ] ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]);
|
2017-01-03 05:33:42 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2014-08-20 23:41:41 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd Qt4Qt5
|
2014-11-08 20:19:46 +00:00
|
|
|
sed -i -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \
|
2014-08-20 23:41:41 +01:00
|
|
|
-e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \
|
|
|
|
-e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/share/qt/translations," \
|
|
|
|
-e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," \
|
|
|
|
qscintilla.pro
|
|
|
|
'';
|
|
|
|
|
2017-01-03 05:33:42 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-20 23:41:41 +01:00
|
|
|
description = "A Qt port of the Scintilla text editing library";
|
|
|
|
longDescription = ''
|
|
|
|
QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor
|
|
|
|
control.
|
|
|
|
|
|
|
|
As well as features found in standard text editing components,
|
|
|
|
QScintilla includes features especially useful when editing and
|
|
|
|
debugging source code. These include support for syntax styling,
|
|
|
|
error indicators, code completion and call tips. The selection
|
|
|
|
margin can contain markers like those used in debuggers to
|
|
|
|
indicate breakpoints and the current line. Styling choices are
|
|
|
|
more open than with many editors, allowing the use of
|
|
|
|
proportional fonts, bold and italics, multiple foreground and
|
|
|
|
background colours and multiple fonts.
|
|
|
|
'';
|
|
|
|
homepage = http://www.riverbankcomputing.com/software/qscintilla/intro;
|
2017-01-03 05:33:42 +00:00
|
|
|
license = with licenses; [ gpl2 gpl3 ]; # and commercial
|
|
|
|
platforms = platforms.unix;
|
2017-01-03 05:43:16 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2014-08-20 23:41:41 +01:00
|
|
|
};
|
|
|
|
}
|