From 4bf49d94179ad2378f50ba54138343fecb75e446 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 9 Sep 2019 19:40:15 +0200 Subject: [PATCH 1/3] 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 --- 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 c75f324bf26..33e57a682b9 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -34,15 +34,16 @@ in stdenv.mkDerivation rec { patches = lib.optional (stdenv.isDarwin && withQt5) [ xcodePatch ]; + # 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 edc638c4b77d946900c39aedce6b633ad56ca60e Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 30 Sep 2019 17:50:03 +0200 Subject: [PATCH 2/3] python3Packages.qscintilla-qt5: fix build --- .../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 e8076db6053..06475c09ca8 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 @@ -26,6 +33,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 5d8ec9b99b49fcefb5527e0beffec7a656ea9112 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 9 Sep 2019 20:59:38 +0200 Subject: [PATCH 3/3] qgis: 3.8.0 -> 3.8.3 --- 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 a57b180d5b2..bb772db2b6a 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 ]; }; }