nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 79 lines 2.5 kB view raw
1{ 2 lib, 3 stdenv, 4 5 fetchurl, 6 unzip, 7 qtbase, 8 qtmacextras ? null, 9 qmake, 10 fixDarwinDylibNames, 11}: 12 13let 14 qtVersion = lib.versions.major qtbase.version; 15in 16stdenv.mkDerivation (finalAttrs: { 17 pname = "qscintilla-qt${qtVersion}"; 18 version = "2.14.1"; 19 20 src = fetchurl { 21 url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${finalAttrs.version}/QScintilla_src-${finalAttrs.version}.tar.gz"; 22 sha256 = "sha256-3+E8asydhd/Lp2zMgGHnGiI5V6bALzw0OzCp1DpM3U0="; 23 }; 24 25 sourceRoot = "QScintilla_src-${finalAttrs.version}/src"; 26 27 buildInputs = [ qtbase ]; 28 29 propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ qtmacextras ]; 30 31 nativeBuildInputs = [ 32 unzip 33 qmake 34 ] 35 ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; 36 37 # Make sure that libqscintilla2.so is available in $out/lib since it is expected 38 # by some packages such as sqlitebrowser 39 postFixup = 40 let 41 libExt = stdenv.hostPlatform.extensions.sharedLibrary; 42 in 43 '' 44 ln -s $out/lib/libqscintilla2_qt${qtVersion}${libExt} $out/lib/libqscintilla2${libExt} 45 ''; 46 47 dontWrapQtApps = true; 48 49 preConfigure = '' 50 substituteInPlace qscintilla.pro \ 51 --replace '$$[QT_INSTALL_LIBS]' $out/lib \ 52 --replace '$$[QT_INSTALL_HEADERS]' $out/include \ 53 --replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \ 54 --replace '$$[QT_HOST_DATA]/mkspecs' $out/mkspecs \ 55 --replace '$$[QT_INSTALL_DATA]' $out/share 56 ''; 57 58 meta = { 59 description = "Qt port of the Scintilla text editing library"; 60 longDescription = '' 61 QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor 62 control. 63 64 As well as features found in standard text editing components, 65 QScintilla includes features especially useful when editing and 66 debugging source code. These include support for syntax styling, 67 error indicators, code completion and call tips. The selection 68 margin can contain markers like those used in debuggers to 69 indicate breakpoints and the current line. Styling choices are 70 more open than with many editors, allowing the use of 71 proportional fonts, bold and italics, multiple foreground and 72 background colours and multiple fonts. 73 ''; 74 homepage = "https://www.riverbankcomputing.com/software/qscintilla/intro"; 75 license = lib.licenses.gpl3; 76 maintainers = with lib.maintainers; [ peterhoeg ]; 77 platforms = lib.platforms.unix; 78 }; 79})