2022-01-07 04:07:37 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, qtbase
|
2023-10-09 19:29:22 +00:00
|
|
|
, qtmacextras ? null
|
2022-01-07 04:07:37 +00:00
|
|
|
, qmake
|
2020-04-24 23:36:52 +00:00
|
|
|
, fixDarwinDylibNames
|
2023-10-09 19:29:22 +00:00
|
|
|
, darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
let
|
|
|
|
stdenv' = if stdenv.isDarwin then
|
|
|
|
darwin.apple_sdk_11_0.stdenv
|
|
|
|
else
|
|
|
|
stdenv
|
|
|
|
;
|
|
|
|
in stdenv'.mkDerivation rec {
|
2022-01-07 04:07:37 +00:00
|
|
|
pname = "qscintilla-qt5";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "2.13.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-07 04:07:37 +00:00
|
|
|
url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_src-${version}.tar.gz";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-tsfl8ntR0l8J/mz4Sumn8Idq8NZdjMtVEQnm57JYhfQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
sourceRoot = "QScintilla_src-${version}/src";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
buildInputs = [ qtbase ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ qtmacextras ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
nativeBuildInputs = [ unzip qmake ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
|
2020-04-24 23:36:52 +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-07 04:07:37 +00:00
|
|
|
ln -s $out/lib/libqscintilla2_qt5.so $out/lib/libqscintilla2.so
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
preConfigure = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
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 \
|
2022-01-07 04:07:37 +00:00
|
|
|
--replace '$$[QT_INSTALL_DATA]' $out/share
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Qt port of the Scintilla text editing library";
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2020-10-11 12:50:04 +00:00
|
|
|
license = with licenses; [ gpl3 ]; # and commercial
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.unix;
|
2023-10-09 19:29:22 +00:00
|
|
|
# ld: library not found for -lcups
|
|
|
|
broken = stdenv.isDarwin && lib.versionAtLeast qtbase.version "6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|