diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index a57b180d5b236..b30d8f0ad7507 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.10.0"; 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 = "0qq4dznxxbpj8b4ypkz7dixc0b0v6rmf3c5hs4m3ka3rzck8jsqc"; }; 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 ]; }; } diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index 9892d0a96b169..bf3d629d357a9 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,25 @@ 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 ); + # 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; - 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," - ''} + 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${lib.optionalString (! withQt5) "/qt"} ''; meta = with stdenv.lib; { @@ -65,9 +69,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; }; } diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix index 16369c73ea294..96485bd1f0620 100644 --- a/pkgs/development/python-modules/qscintilla-qt5/default.nix +++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix @@ -15,17 +15,27 @@ 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 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 \ --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 \ @@ -37,6 +47,5 @@ buildPythonPackage { license = licenses.lgpl21Plus; maintainers = with maintainers; [ lsix ]; homepage = https://www.riverbankcomputing.com/software/qscintilla/; - broken = true; }; }