-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
qscintilla: fix build on darwin #150595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qscintilla: fix build on darwin #150595
Changes from all commits
0c09895
f7a0145
fde6436
aa44e61
7a7a180
b196462
c39ac29
b83d9bd
06d2d8b
693a0e8
2cdbb56
9d8903b
24522dc
8dfa516
b8504e9
a98370a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| { stdenv, lib, fetchurl, unzip, qt4, qmake4Hook | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "qscintilla-qt4"; | ||
| 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"; | ||
|
|
||
| buildInputs = [ qt4 ]; | ||
|
|
||
| nativeBuildInputs = [ unzip qmake4Hook ]; | ||
|
|
||
| patches = ./fix-qt4-build.patch; | ||
|
|
||
| # Make sure that libqscintilla2.so is available in $out/lib since it is expected | ||
| # by some packages such as sqlitebrowser | ||
| postFixup = '' | ||
| ln -s $out/lib/libqscintilla2_qt?.so $out/lib/libqscintilla2.so | ||
| ''; | ||
|
|
||
| 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 \ | ||
| --replace '$$[QT_INSTALL_DATA]' $out/share | ||
| ''; | ||
|
|
||
| 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 ]; | ||
| platforms = platforms.linux; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { lib | ||
| , buildPythonPackage | ||
| , disabledIf | ||
| , isPy3k | ||
| , isPyPy | ||
| , pkgs | ||
| , python | ||
| , pyqt4 | ||
| }: | ||
|
|
||
| disabledIf (isPy3k || isPyPy) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw, where does this limitation come from? I don't see it in the previous code
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was just a 100% copy of what was in https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/qscintilla/default.nix -- I didn't do any of the refactoring you're looking into now!
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks |
||
| (buildPythonPackage { | ||
| pname = "qscintilla"; | ||
| version = pkgs.qscintilla.version; | ||
| format = "other"; | ||
|
|
||
| src = pkgs.qscintilla.src; | ||
|
|
||
| nativeBuildInputs = [ pkgs.xorg.lndir ]; | ||
|
|
||
| buildInputs = [ pyqt4.qt pyqt4 ]; | ||
|
|
||
| preConfigure = '' | ||
| mkdir -p $out | ||
| lndir ${pyqt4} $out | ||
| rm -rf "$out/nix-support" | ||
| cd Python | ||
| ${python.executable} ./configure-old.py \ | ||
| --destdir $out/lib/${python.libPrefix}/site-packages/PyQt4 \ | ||
| --apidir $out/api/${python.libPrefix} \ | ||
| -n ${pkgs.qscintilla}/include \ | ||
| -o ${pkgs.qscintilla}/lib \ | ||
| --sipdir $out/share/sip | ||
| ''; | ||
|
|
||
| meta = with lib; { | ||
| description = "A Python binding to QScintilla, Qt based text editing control"; | ||
| license = licenses.lgpl21Plus; | ||
| maintainers = with maintainers; [ danbst ]; | ||
| platforms = platforms.linux; | ||
| }; | ||
| }) | ||
Uh oh!
There was an error while loading. Please reload this page.