From f2bda75493eaac7c301fefd1eb15c8b25d7d7f7b Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 19 Feb 2019 11:43:55 +0800 Subject: [PATCH 1/6] qscintilla: 2.9.4 -> 2.11.2 We strip the library suffix as we don't need it and it confuses various downstream consumers. Also replace calls to sed with substituteInPlace as the latter will complain in case it doesn't perform a substitution. (cherry picked from commit 76ad2796be28c5fbe8f8fe2b9bada12c3e1360e2) --- .../libraries/qscintilla/default.nix | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index 9892d0a96b169..6bbb332c76e24 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -4,22 +4,26 @@ , fixDarwinDylibNames }: -# 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"; +let + # Fix Xcode 8 compilation problem + xcodePatch = fetchurl { + url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch"; + sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9"; + }; + + pname = "qscintilla-qt${if withQt5 then "5" else "4"}"; + version = "2.11.2"; - name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${version}"; +in stdenv.mkDerivation rec { + inherit pname version; src = fetchurl { - url = "mirror://sourceforge/pyqt/QScintilla2/QScintilla-${version}/QScintilla_gpl-${version}.zip"; - sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi"; + url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_gpl-${version}.tar.gz"; + sha256 = "18glb2v07mwfz6p8qmwhzcaaczyc36x3gn9wx8ndm7q6d93xr6q2"; }; + sourceRoot = "QScintilla_gpl-${version}/Qt4Qt5"; + buildInputs = [ (if withQt5 then qtbase else qt4) ]; propagatedBuildInputs = lib.optional (withQt5 && stdenv.isDarwin) qtmacextras; @@ -28,25 +32,24 @@ stdenv.mkDerivation rec { ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]) ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; - patches = (lib.optional (stdenv.isDarwin && withQt5) xcodePatch) ++ (lib.optional (!withQt5) ./fix-qt4-build.patch ); 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," - ''} + # By default qscintilla will name the library with a qt version suffix which + # confuses the crap out of sqlitebrowser and possibly others so we simply + # strip the suffix as we don't need it and the various FindQScintilla.cmake + # files floating around *should* look for the un-suffixed version. + postPatch = '' + substituteInPlace qscintilla.pro \ + --replace '_qt$''${QT_MAJOR_VERSION}' "" \ + --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${lib.optionalString (! withQt5) "/qt"} ''; meta = with stdenv.lib; { @@ -65,9 +68,10 @@ stdenv.mkDerivation rec { proportional fonts, bold and italics, multiple foreground and 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 - platforms = platforms.unix; maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.unix; + broken = !withQt5; }; } From 5072e7cc0dd2253bc3759fef3be4d91bdeb959f4 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 9 Sep 2019 19:40:15 +0200 Subject: [PATCH 2/6] qscintilla: Use both .so and _qt5.so suffix Make sure that the both libqscintilla2_qt5.so and libqscintilla2.so are present in `$out/lib` so all the dependant packages can find the most appropriate library (some except the empty suffix, such as sqlitebrowser, other expect the _qt5 suffix such as python3Packages.qscintilla-qt5). The mechanism would also work work for qt4 build, but it is broken at the moment. Also make sure python*Packages.qscintilla* are up to date (cherry picked from commit 4bf49d94179ad2378f50ba54138343fecb75e446) --- pkgs/development/libraries/qscintilla/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index 6bbb332c76e24..bf3d629d357a9 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -35,15 +35,16 @@ in stdenv.mkDerivation rec { patches = (lib.optional (stdenv.isDarwin && withQt5) xcodePatch) ++ (lib.optional (!withQt5) ./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 + ''; + enableParallelBuilding = true; - # By default qscintilla will name the library with a qt version suffix which - # confuses the crap out of sqlitebrowser and possibly others so we simply - # strip the suffix as we don't need it and the various FindQScintilla.cmake - # files floating around *should* look for the un-suffixed version. postPatch = '' substituteInPlace qscintilla.pro \ - --replace '_qt$''${QT_MAJOR_VERSION}' "" \ --replace '$$[QT_INSTALL_LIBS]' $out/lib \ --replace '$$[QT_INSTALL_HEADERS]' $out/include \ --replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \ From bce18ad3fd88c02a5758149d44faa428ac37f03f Mon Sep 17 00:00:00 2001 From: Benedikt Hunger Date: Tue, 22 Oct 2019 09:49:50 +0200 Subject: [PATCH 3/6] pythonPackages.qscintilla-qt5: fix build (cherry picked from commit b27bdf4ec8a02c1c956b15c344069f492b4babc6) --- pkgs/development/python-modules/qscintilla-qt5/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix index 16369c73ea294..06c9ebc8ed423 100644 --- a/pkgs/development/python-modules/qscintilla-qt5/default.nix +++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix @@ -20,6 +20,8 @@ buildPythonPackage { lndir ${pyqt5} $out rm -rf "$out/nix-support" cd Python + substituteInPlace configure.py \ + --replace "qmake = {'CONFIG': 'qscintilla2'}" "qmake = {'CONFIG': 'qscintilla2', 'QT': 'widgets printsupport'}" ${python.executable} ./configure.py \ --pyqt=PyQt5 \ --destdir=$out/${python.sitePackages}/PyQt5 \ @@ -37,6 +39,5 @@ buildPythonPackage { license = licenses.lgpl21Plus; maintainers = with maintainers; [ lsix ]; homepage = https://www.riverbankcomputing.com/software/qscintilla/; - broken = true; }; } From f5960c7d4335b2219924b12d26d394c56d7fb41c Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 30 Sep 2019 17:50:03 +0200 Subject: [PATCH 4/6] python3Packages.qscintilla-qt5: fix build (cherry picked from commit edc638c4b77d946900c39aedce6b633ad56ca60e) --- .../development/python-modules/qscintilla-qt5/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix index 06c9ebc8ed423..96485bd1f0620 100644 --- a/pkgs/development/python-modules/qscintilla-qt5/default.nix +++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix @@ -15,6 +15,13 @@ buildPythonPackage { buildInputs = [ qscintilla ]; propagatedBuildInputs = [ pyqt5 ]; + postPatch = '' + substituteInPlace Python/configure.py \ + --replace \ + "target_config.py_module_dir" \ + "'$out/${python.sitePackages}'" + ''; + preConfigure = '' mkdir -p $out lndir ${pyqt5} $out @@ -28,6 +35,7 @@ buildPythonPackage { --stubsdir=$out/${python.sitePackages}/PyQt5 \ --apidir=$out/api/${python.libPrefix} \ --qsci-incdir=${qscintilla}/include \ + --qsci-featuresdir=${qscintilla}/mkspecs/features \ --qsci-libdir=${qscintilla}/lib \ --pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \ --qsci-sipdir=$out/share/sip/PyQt5 \ From cb8aaa15f1593baf0592a0a1d34aa130f5b18a68 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 9 Sep 2019 20:59:38 +0200 Subject: [PATCH 5/6] qgis: 3.8.0 -> 3.8.3 (cherry picked from commit 5d8ec9b99b49fcefb5527e0beffec7a656ea9112) --- pkgs/applications/gis/qgis/unwrapped.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index a57b180d5b236..bb772db2b6a49 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, cmake, ninja, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl +{ mkDerivation, lib, fetchFromGitHub, cmake, ninja, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl , qwt, fcgi, python3Packages, libspatialindex, libspatialite, postgresql , txt2tags, openssl, libzip, hdf5, netcdf, exiv2 , qtbase, qtwebkit, qtsensors, qca-qt5, qtkeychain, qscintilla, qtserialport, qtxmlpatterns @@ -9,8 +9,8 @@ let pythonBuildInputs = with python3Packages; [ qscintilla-qt5 gdal jinja2 numpy psycopg2 chardet dateutil pyyaml pytz requests urllib3 pygments pyqt5 sip owslib six ]; -in stdenv.mkDerivation rec { - version = "3.8.0"; +in mkDerivation rec { + version = "3.8.3"; pname = "qgis"; name = "${pname}-unwrapped-${version}"; @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { owner = "qgis"; repo = "QGIS"; rev = "final-${lib.replaceStrings ["."] ["_"] version}"; - sha256 = "11jqj6lavpw9piv0rm8vvbgd99zhcxl6yfjg699wlrjlyf71xac5"; + sha256 = "16axjih48qn8ri3p71d8f7k0y3rd05wghmg1fcbyda871b45b2f8"; }; passthru = { @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec { buildInputs = [ openssl proj geos xlibsWrapper sqlite gsl qwt exiv2 fcgi libspatialindex libspatialite postgresql txt2tags libzip hdf5 netcdf qtbase qtwebkit qtsensors qca-qt5 qtkeychain qscintilla qtserialport qtxmlpatterns] ++ - (stdenv.lib.optional withGrass grass) ++ pythonBuildInputs; + (lib.optional withGrass grass) ++ pythonBuildInputs; nativeBuildInputs = [ cmake flex bison ninja ]; @@ -45,13 +45,13 @@ in stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/share/sip/PyQt5" "-DQSCI_SIP_DIR=${python3Packages.qscintilla-qt5}/share/sip/PyQt5" ] ++ - stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"; + lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"; meta = { description = "A Free and Open Source Geographic Information System"; homepage = http://www.qgis.org; - license = stdenv.lib.licenses.gpl2Plus; - platforms = with stdenv.lib.platforms; linux; - maintainers = with stdenv.lib.maintainers; [ lsix ]; + license = lib.licenses.gpl2Plus; + platforms = with lib.platforms; linux; + maintainers = with lib.maintainers; [ lsix ]; }; } From 1c3c88c1820f8ed0b23d05e6280c5ea546936d82 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Tue, 29 Oct 2019 10:22:01 +0100 Subject: [PATCH 6/6] qgis: 3.8.3 -> 3.10.0 See http://changelog.qgis.org/en/qgis/version/3.10/ (cherry picked from commit c803971bfd13c734ba3839c324f4d1147c45988e) --- pkgs/applications/gis/qgis/unwrapped.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index bb772db2b6a49..b30d8f0ad7507 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -10,7 +10,7 @@ let [ qscintilla-qt5 gdal jinja2 numpy psycopg2 chardet dateutil pyyaml pytz requests urllib3 pygments pyqt5 sip owslib six ]; in mkDerivation rec { - version = "3.8.3"; + version = "3.10.0"; pname = "qgis"; name = "${pname}-unwrapped-${version}"; @@ -18,7 +18,7 @@ in mkDerivation rec { owner = "qgis"; repo = "QGIS"; rev = "final-${lib.replaceStrings ["."] ["_"] version}"; - sha256 = "16axjih48qn8ri3p71d8f7k0y3rd05wghmg1fcbyda871b45b2f8"; + sha256 = "0qq4dznxxbpj8b4ypkz7dixc0b0v6rmf3c5hs4m3ka3rzck8jsqc"; }; passthru = {