Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,16 +9,16 @@ 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}";

src = fetchFromGitHub {
owner = "qgis";
repo = "QGIS";
rev = "final-${lib.replaceStrings ["."] ["_"] version}";
sha256 = "11jqj6lavpw9piv0rm8vvbgd99zhcxl6yfjg699wlrjlyf71xac5";
sha256 = "0qq4dznxxbpj8b4ypkz7dixc0b0v6rmf3c5hs4m3ka3rzck8jsqc";
};

passthru = {
Expand All @@ -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 ];

Expand All @@ -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 ];
};
}
59 changes: 32 additions & 27 deletions pkgs/development/libraries/qscintilla/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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; {
Expand All @@ -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;
};
}
11 changes: 10 additions & 1 deletion pkgs/development/python-modules/qscintilla-qt5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -37,6 +47,5 @@ buildPythonPackage {
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ lsix ];
homepage = https://www.riverbankcomputing.com/software/qscintilla/;
broken = true;
};
}