diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/qscintilla | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qscintilla')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/qscintilla/default.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qscintilla/default.nix b/nixpkgs/pkgs/development/libraries/qscintilla/default.nix new file mode 100644 index 000000000000..bc3b44413054 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qscintilla/default.nix @@ -0,0 +1,68 @@ +{ stdenv, lib, fetchurl, unzip +, qt4 ? null, qmake4Hook ? null +, withQt5 ? false, qtbase ? null, qtmacextras ? null, qmake ? null +}: + +# Fix Xcode 8 compilation problem +let xcodePatch = + fetchurl { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch"; + sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9"; }; +in +stdenv.mkDerivation rec { + pname = "qscintilla"; + version = "2.9.4"; + + name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/pyqt/QScintilla2/QScintilla-${version}/QScintilla_gpl-${version}.zip"; + sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi"; + }; + + buildInputs = [ (if withQt5 then qtbase else qt4) ] + ++ lib.optional (withQt5 && stdenv.isDarwin) qtmacextras; + nativeBuildInputs = [ unzip ] + ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]); + + + patches = lib.optional (stdenv.isDarwin && withQt5) [ xcodePatch ]; + + enableParallelBuilding = true; + + preConfigure = '' + cd Qt4Qt5 + sed -i qscintilla.pro \ + -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \ + -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \ + -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/translations," \ + ${if withQt5 then '' + -e "s,\$\$\\[QT_HOST_DATA\\]/mkspecs,$out/mkspecs," \ + -e "s,\$\$\\[QT_INSTALL_DATA\\]/mkspecs,$out/mkspecs," \ + -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share," + '' else '' + -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," + ''} + ''; + + meta = with stdenv.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 = http://www.riverbankcomputing.com/software/qscintilla/intro; + license = with licenses; [ gpl2 gpl3 ]; # and commercial + platforms = platforms.unix; + maintainers = with maintainers; [ peterhoeg ]; + }; +} |