Merge pull request #153744 from prusnak/qscintilla-cleanup

qscintilla: cleanup
This commit is contained in:
Pavol Rusnak 2022-01-06 19:57:08 +01:00 committed by GitHub
commit a523706d02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 79 deletions

View file

@ -1,4 +1,9 @@
{ stdenv, lib, fetchurl, unzip, qt4, qmake4Hook
{ stdenv
, lib
, fetchurl
, unzip
, qt4
, qmake4Hook
}:
stdenv.mkDerivation rec {
@ -16,12 +21,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ unzip qmake4Hook ];
patches = ./fix-qt4-build.patch;
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
ln -s $out/lib/libqscintilla2_qt4.so $out/lib/libqscintilla2.so
'';
dontWrapQtApps = true;

View file

@ -1,5 +1,9 @@
{ stdenv, lib, fetchurl, unzip
, qtbase, qtmacextras
{ stdenv
, lib
, fetchurl
, unzip
, qtbase
, qtmacextras
, qmake
, fixDarwinDylibNames
}:
@ -20,12 +24,12 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ qtmacextras ];
nativeBuildInputs = [ unzip qmake ]
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
# 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
ln -s $out/lib/libqscintilla2_qt5.so $out/lib/libqscintilla2.so
'';
dontWrapQtApps = true;

View file

@ -1,6 +1,5 @@
{ lib
, buildPythonPackage
, disabledIf
, isPy3k
, isPyPy
, pkgs
@ -8,35 +7,36 @@
, pyqt4
}:
disabledIf (isPy3k || isPyPy)
(buildPythonPackage {
pname = "qscintilla";
version = pkgs.qscintilla.version;
format = "other";
buildPythonPackage {
pname = "qscintilla-qt4";
version = pkgs.qscintilla-qt4.version;
format = "other";
src = pkgs.qscintilla.src;
disabled = isPyPy;
nativeBuildInputs = [ pkgs.xorg.lndir ];
src = pkgs.qscintilla-qt4.src;
buildInputs = [ pyqt4.qt pyqt4 ];
nativeBuildInputs = [ pkgs.xorg.lndir ];
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
'';
buildInputs = [ pyqt4.qt pyqt4 ];
meta = with lib; {
description = "A Python binding to QScintilla, Qt based text editing control";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ danbst ];
platforms = platforms.linux;
};
})
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-qt4}/include \
-o ${pkgs.qscintilla-qt4}/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;
};
}

View file

@ -10,7 +10,7 @@
let
inherit (pythonPackages) buildPythonPackage isPy3k python sip sipbuild pyqt5 pyqt-builder;
in buildPythonPackage rec {
pname = "qscintilla";
pname = "qscintilla-qt5";
version = qscintilla.version;
src = qscintilla.src;
format = "pyproject";

View file

@ -1,43 +0,0 @@
{ lib
, buildPythonPackage
, disabledIf
, isPy3k
, isPyPy
, pkgs
, python
, pyqt4
}:
disabledIf (isPy3k || isPyPy)
(buildPythonPackage {
# TODO: Qt5 support
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.unix;
};
})