Merge pull request #56034 from peterhoeg/u/sqlite
qscintilla: 2.9.4 -> 2.11.2 and sqlitebrowser: 3.11.2
This commit is contained in:
commit
fccbb5daf3
@ -4,22 +4,26 @@
|
|||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Fix Xcode 8 compilation problem
|
let
|
||||||
let xcodePatch =
|
# Fix Xcode 8 compilation problem
|
||||||
fetchurl { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch";
|
xcodePatch = fetchurl {
|
||||||
sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9"; };
|
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch";
|
||||||
in
|
sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9";
|
||||||
stdenv.mkDerivation rec {
|
};
|
||||||
pname = "qscintilla";
|
|
||||||
version = "2.9.4";
|
|
||||||
|
|
||||||
name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${version}";
|
pname = "qscintilla-qt${if withQt5 then "5" else "4"}";
|
||||||
|
version = "2.11.2";
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/pyqt/QScintilla2/QScintilla-${version}/QScintilla_gpl-${version}.zip";
|
url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_gpl-${version}.tar.gz";
|
||||||
sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi";
|
sha256 = "18glb2v07mwfz6p8qmwhzcaaczyc36x3gn9wx8ndm7q6d93xr6q2";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sourceRoot = "QScintilla_gpl-${version}/Qt4Qt5";
|
||||||
|
|
||||||
buildInputs = [ (if withQt5 then qtbase else qt4) ];
|
buildInputs = [ (if withQt5 then qtbase else qt4) ];
|
||||||
|
|
||||||
propagatedBuildInputs = lib.optional (withQt5 && stdenv.isDarwin) qtmacextras;
|
propagatedBuildInputs = lib.optional (withQt5 && stdenv.isDarwin) qtmacextras;
|
||||||
@ -28,24 +32,23 @@ stdenv.mkDerivation rec {
|
|||||||
++ (if withQt5 then [ qmake ] else [ qmake4Hook ])
|
++ (if withQt5 then [ qmake ] else [ qmake4Hook ])
|
||||||
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
|
|
||||||
patches = lib.optional (stdenv.isDarwin && withQt5) [ xcodePatch ];
|
patches = lib.optional (stdenv.isDarwin && withQt5) [ xcodePatch ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
preConfigure = ''
|
# By default qscintilla will name the library with a qt version suffix which
|
||||||
cd Qt4Qt5
|
# confuses the crap out of sqlitebrowser and possibly others so we simply
|
||||||
sed -i qscintilla.pro \
|
# strip the suffix as we don't need it and the various FindQScintilla.cmake
|
||||||
-e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \
|
# files floating around *should* look for the un-suffixed version.
|
||||||
-e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \
|
postPatch = ''
|
||||||
-e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/translations," \
|
substituteInPlace qscintilla.pro \
|
||||||
${if withQt5 then ''
|
--replace '_qt$''${QT_MAJOR_VERSION}' "" \
|
||||||
-e "s,\$\$\\[QT_HOST_DATA\\]/mkspecs,$out/mkspecs," \
|
--replace '$$[QT_INSTALL_LIBS]' $out/lib \
|
||||||
-e "s,\$\$\\[QT_INSTALL_DATA\\]/mkspecs,$out/mkspecs," \
|
--replace '$$[QT_INSTALL_HEADERS]' $out/include \
|
||||||
-e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share,"
|
--replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \
|
||||||
'' else ''
|
--replace '$$[QT_HOST_DATA]/mkspecs' $out/mkspecs \
|
||||||
-e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt,"
|
--replace '$$[QT_INSTALL_DATA]/mkspecs' $out/mkspecs \
|
||||||
''}
|
--replace '$$[QT_INSTALL_DATA]' $out/share${lib.optionalString (! withQt5) "/qt"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -64,9 +67,10 @@ stdenv.mkDerivation rec {
|
|||||||
proportional fonts, bold and italics, multiple foreground and
|
proportional fonts, bold and italics, multiple foreground and
|
||||||
background colours and multiple fonts.
|
background colours and multiple fonts.
|
||||||
'';
|
'';
|
||||||
homepage = http://www.riverbankcomputing.com/software/qscintilla/intro;
|
homepage = https://www.riverbankcomputing.com/software/qscintilla/intro;
|
||||||
license = with licenses; [ gpl2 gpl3 ]; # and commercial
|
license = with licenses; [ gpl2 gpl3 ]; # and commercial
|
||||||
platforms = platforms.unix;
|
|
||||||
maintainers = with maintainers; [ peterhoeg ];
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
broken = !withQt5;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
{ mkDerivation, lib, fetchFromGitHub, cmake, antlr
|
{ mkDerivation, lib, fetchFromGitHub, cmake, antlr
|
||||||
, qtbase, qttools, sqlite }:
|
, qtbase, qttools, qscintilla, sqlite }:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
version = "3.11.2";
|
|
||||||
pname = "sqlitebrowser";
|
pname = "sqlitebrowser";
|
||||||
|
version = "3.11.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
repo = pname;
|
|
||||||
owner = pname;
|
owner = pname;
|
||||||
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0ydd5fg76d5d23byac1f7f8mzx3brmd0cnnkd58qpmlzi7p9hcvx";
|
sha256 = "0ydd5fg76d5d23byac1f7f8mzx3brmd0cnnkd58qpmlzi7p9hcvx";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qtbase sqlite ];
|
buildInputs = [ antlr qtbase qscintilla sqlite ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake antlr qttools ];
|
nativeBuildInputs = [ cmake qttools ];
|
||||||
|
|
||||||
# Use internal `qscintilla` rather than our package to fix the build
|
|
||||||
# (https://github.com/sqlitebrowser/sqlitebrowser/issues/1348#issuecomment-374170936).
|
|
||||||
# This can probably be removed when https://github.com/NixOS/nixpkgs/pull/56034 is merged.
|
|
||||||
cmakeFlags = [ "-DFORCE_INTERNAL_QSCINTILLA=ON" ];
|
|
||||||
|
|
||||||
NIX_LDFLAGS = [
|
NIX_LDFLAGS = [
|
||||||
"-lQt5PrintSupport"
|
"-lQt5PrintSupport"
|
||||||
@ -32,6 +27,6 @@ mkDerivation rec {
|
|||||||
homepage = http://sqlitebrowser.org/;
|
homepage = http://sqlitebrowser.org/;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ ma27 ];
|
maintainers = with maintainers; [ ma27 ];
|
||||||
platforms = platforms.linux; # can only test on linux
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user