2022-01-06 17:01:41 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, qt4
|
|
|
|
, qmake4Hook
|
2021-12-14 16:41:59 +00:00
|
|
|
}:
|
|
|
|
|
2022-01-05 23:49:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-15 16:07:15 +00:00
|
|
|
pname = "qscintilla-qt4";
|
2021-12-14 16:41:59 +00:00
|
|
|
version = "2.11.6";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla-${version}.tar.gz";
|
|
|
|
sha256 = "5zRgV9tH0vs4RGf6/M/LE6oHQTc8XVk7xytVsvDdIKc=";
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "QScintilla-${version}/Qt4Qt5";
|
|
|
|
|
2021-12-15 16:07:15 +00:00
|
|
|
buildInputs = [ qt4 ];
|
2021-12-14 16:41:59 +00:00
|
|
|
|
2021-12-15 16:07:15 +00:00
|
|
|
nativeBuildInputs = [ unzip qmake4Hook ];
|
2021-12-14 16:41:59 +00:00
|
|
|
|
2022-01-06 17:01:41 +00:00
|
|
|
patches = [
|
|
|
|
./fix-qt4-build.patch
|
|
|
|
];
|
2021-12-14 16:41:59 +00:00
|
|
|
|
|
|
|
# Make sure that libqscintilla2.so is available in $out/lib since it is expected
|
|
|
|
# by some packages such as sqlitebrowser
|
|
|
|
postFixup = ''
|
2022-01-06 17:01:41 +00:00
|
|
|
ln -s $out/lib/libqscintilla2_qt4.so $out/lib/libqscintilla2.so
|
2021-12-14 16:41:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace qscintilla.pro \
|
|
|
|
--replace '$$[QT_INSTALL_LIBS]' $out/lib \
|
|
|
|
--replace '$$[QT_INSTALL_HEADERS]' $out/include \
|
|
|
|
--replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \
|
|
|
|
--replace '$$[QT_HOST_DATA]/mkspecs' $out/mkspecs \
|
|
|
|
--replace '$$[QT_INSTALL_DATA]/mkspecs' $out/mkspecs \
|
2021-12-15 16:07:15 +00:00
|
|
|
--replace '$$[QT_INSTALL_DATA]' $out/share
|
2021-12-14 16:41:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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 = "https://www.riverbankcomputing.com/software/qscintilla/intro";
|
|
|
|
license = with licenses; [ gpl3 ]; # and commercial
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2021-12-15 16:07:15 +00:00
|
|
|
platforms = platforms.linux;
|
2021-12-14 16:41:59 +00:00
|
|
|
};
|
|
|
|
}
|