14 stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
16 stdenv'.mkDerivation rec {
17 pname = "qscintilla-qt5";
21 url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_src-${version}.tar.gz";
22 sha256 = "sha256-tsfl8ntR0l8J/mz4Sumn8Idq8NZdjMtVEQnm57JYhfQ=";
25 sourceRoot = "QScintilla_src-${version}/src";
27 buildInputs = [ qtbase ];
29 propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ];
34 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ];
36 # Make sure that libqscintilla2.so is available in $out/lib since it is expected
37 # by some packages such as sqlitebrowser
39 ln -s $out/lib/libqscintilla2_qt5.so $out/lib/libqscintilla2.so
42 dontWrapQtApps = true;
45 substituteInPlace qscintilla.pro \
46 --replace '$$[QT_INSTALL_LIBS]' $out/lib \
47 --replace '$$[QT_INSTALL_HEADERS]' $out/include \
48 --replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \
49 --replace '$$[QT_HOST_DATA]/mkspecs' $out/mkspecs \
50 --replace '$$[QT_INSTALL_DATA]' $out/share
54 description = "Qt port of the Scintilla text editing library";
56 QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor
59 As well as features found in standard text editing components,
60 QScintilla includes features especially useful when editing and
61 debugging source code. These include support for syntax styling,
62 error indicators, code completion and call tips. The selection
63 margin can contain markers like those used in debuggers to
64 indicate breakpoints and the current line. Styling choices are
65 more open than with many editors, allowing the use of
66 proportional fonts, bold and italics, multiple foreground and
67 background colours and multiple fonts.
69 homepage = "https://www.riverbankcomputing.com/software/qscintilla/intro";
70 license = with licenses; [ gpl3 ]; # and commercial
71 maintainers = with maintainers; [ peterhoeg ];
72 platforms = platforms.unix;
73 # ld: library not found for -lcups
74 broken = stdenv.hostPlatform.isDarwin && lib.versionAtLeast qtbase.version "6";