diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index bdd8ace1e3d59..70b5ffcc707ce 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -1,9 +1,42 @@ -{ mkDerivation, lib, fetchFromGitHub, cmake, ninja, flex, bison, proj, geos -, xlibsWrapper, sqlite, gsl, qwt, fcgi, python3Packages, libspatialindex -, libspatialite, postgresql, txt2tags, openssl, libzip, hdf5, netcdf, exiv2 -, protobuf, qtbase, qtsensors, qca-qt5, qtkeychain, qscintilla, qtserialport -, qtxmlpatterns, withGrass ? true, grass, withWebKit ? true, qtwebkit }: -with lib; +{ lib +, mkDerivation +, fetchFromGitHub +, fetchpatch +, cmake +, ninja +, flex +, bison +, proj +, geos +, xlibsWrapper +, sqlite +, gsl +, qwt +, fcgi +, python3Packages +, libspatialindex +, libspatialite +, postgresql +, txt2tags +, openssl +, libzip +, hdf5 +, netcdf +, exiv2 +, protobuf +, qtbase +, qtsensors +, qca-qt5 +, qtkeychain +, qscintilla +, qtserialport +, qtxmlpatterns +, withGrass ? true +, grass +, withWebKit ? true +, qtwebkit +}: + let pythonBuildInputs = with python3Packages; [ qscintilla-qt5 @@ -25,8 +58,7 @@ let ]; in mkDerivation rec { version = "3.16.10"; - pname = "qgis"; - name = "${pname}-unwrapped-${version}"; + pname = "qgis-unwrapped"; src = fetchFromGitHub { owner = "qgis"; @@ -35,6 +67,13 @@ in mkDerivation rec { sha256 = "sha256-/lsfyTDlkZNIVHg5qgZW7qfOyTC2+1r3ZbsnQmEdy30="; }; + patches = [ + (fetchpatch { + url = "https://github.com/qgis/QGIS/commit/fc1ac8bef8dcc3194857ecd32519aca4867b4fa1.patch"; + sha256 = "106smg3drx8c7yxzfhd1c7xrq757l5cfxx8lklihyvr4a7wc9gpy"; + }) + ]; + passthru = { inherit pythonBuildInputs; inherit python3Packages; diff --git a/pkgs/applications/misc/osm2xmap/default.nix b/pkgs/applications/misc/osm2xmap/default.nix index 4f2af99ab14dd..f9f880050ed68 100644 --- a/pkgs/applications/misc/osm2xmap/default.nix +++ b/pkgs/applications/misc/osm2xmap/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, libroxml, proj, libyamlcpp, boost } : +{ lib, stdenv, fetchFromGitHub, libroxml, proj_7, libyamlcpp, boost } : stdenv.mkDerivation rec { pname = "osm2xmap"; @@ -14,14 +14,14 @@ stdenv.mkDerivation rec { makeFlags = [ "GIT_VERSION=${version}" "GIT_TIMESTAMP=" - "SHAREDIR=${placeholder "out"}/share/osm2xmap" + "SHAREDIR=${placeholder "out"}/share/osm2xmap/" "INSTALL_BINDIR=${placeholder "out"}/bin" "INSTALL_MANDIR=${placeholder "out"}/share/man/man1" ]; NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"; - buildInputs = [ libroxml proj libyamlcpp boost ]; + buildInputs = [ libroxml proj_7 libyamlcpp boost ]; meta = with lib; { homepage = "https://github.com/sembruk/osm2xmap"; diff --git a/pkgs/applications/misc/survex/default.nix b/pkgs/applications/misc/survex/default.nix index f6865f877d7de..277230965884a 100644 --- a/pkgs/applications/misc/survex/default.nix +++ b/pkgs/applications/misc/survex/default.nix @@ -6,7 +6,7 @@ , wxGTK30-gtk3 , wxmac , ffmpeg -, proj +, proj_7 , perl532 , unscii , python @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ docbook5 docbook2x autoreconfHook pkg-config perlenv python ]; buildInputs = [ - libGL libGLU ffmpeg proj + libGL libGLU ffmpeg proj_7 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ wxmac Carbon Cocoa ] ++ lib.optionals stdenv.hostPlatform.isLinux [ diff --git a/pkgs/applications/misc/xygrib/default.nix b/pkgs/applications/misc/xygrib/default.nix index 864ea27ede778..580faa3602683 100644 --- a/pkgs/applications/misc/xygrib/default.nix +++ b/pkgs/applications/misc/xygrib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg }: +{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj_7, libpng, openjpeg }: stdenv.mkDerivation rec { version = "1.2.6.1"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake qttools wrapQtAppsHook ]; - buildInputs = [ bzip2 qtbase libnova proj openjpeg libpng ]; + buildInputs = [ bzip2 qtbase libnova proj_7 openjpeg libpng ]; cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-${lib.versions.majorMinor openjpeg.version}" ] ++ lib.optionals stdenv.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ]; diff --git a/pkgs/applications/science/misc/gplates/default.nix b/pkgs/applications/science/misc/gplates/default.nix index d0315d1596742..67ab202160ca3 100644 --- a/pkgs/applications/science/misc/gplates/default.nix +++ b/pkgs/applications/science/misc/gplates/default.nix @@ -1,31 +1,69 @@ -{ lib, stdenv, fetchurl, qt4, qwt6_qt4, libGLU, libGL, glew, gdal, cgal -, proj, boost, cmake, python2, doxygen, graphviz, gmp, mpfr }: +{ lib +, mkDerivation +, fetchurl +, cmake +, doxygen +, graphviz +, boost +, cgal_5 +, gdal +, glew +, gmp +, libGL +, libGLU +, mpfr +, proj +, python3 +, qtxmlpatterns +, qwt +}: -stdenv.mkDerivation rec { +let + python = python3.withPackages (ps: with ps; [ + numpy + ]); + boost' = boost.override { + enablePython = true; + inherit python; + }; + cgal = cgal_5.override { + boost = boost'; + }; +in mkDerivation rec { pname = "gplates"; - version = "2.2.0"; + version = "2.3.0"; src = fetchurl { - url = "mirror://sourceforge/gplates/${pname}-${version}-unixsrc.tar.bz2"; - sha256 = "1jrcv498vpcs8xklhbsgg12yfa90f96p2mwq6x5sjnrlpf8mh50b"; + name = "gplates_${version}_src.tar.bz2"; + url = "https://www.earthbyte.org/download/8421/?uid=b89bb31428"; + sha256 = "0lrcmcxc924ixddii8cyglqlwwxvk7f00g4yzbss5i3fgcbh8n96"; }; - nativeBuildInputs = [ cmake ]; - buildInputs = [ - qt4 qwt6_qt4 libGLU libGL glew gdal cgal proj python2 - doxygen graphviz gmp mpfr - (boost.override { - enablePython = true; - python = python2; - }) + nativeBuildInputs = [ + cmake + doxygen + graphviz ]; - NIX_CFLAGS_LINK="-ldl -lpthread -lutil"; + buildInputs = [ + boost' + cgal + gdal + glew + gmp + libGL + libGLU + mpfr + proj + python + qtxmlpatterns + qwt + ]; meta = with lib; { description = "Desktop software for the interactive visualisation of plate-tectonics"; homepage = "https://www.gplates.org"; - license = licenses.gpl2; + license = licenses.gpl2Only; platforms = platforms.all; }; } diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index c2556a428a15f..6fff0c1e1bbcf 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -96,5 +96,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ hrdinka ]; license = licenses.lgpl21; platforms = platforms.all; + # https://github.com/mapnik/mapnik/issues/4232 + broken = lib.versionAtLeast proj.version "8.0.0"; }; } diff --git a/pkgs/development/libraries/proj/7.nix b/pkgs/development/libraries/proj/7.nix new file mode 100644 index 0000000000000..3eb4789939ffc --- /dev/null +++ b/pkgs/development/libraries/proj/7.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, sqlite +, libtiff +, curl +, gtest +, fetchpatch +}: + +stdenv.mkDerivation rec { + pname = "proj"; + version = "7.2.1"; + + src = fetchFromGitHub { + owner = "OSGeo"; + repo = "PROJ"; + rev = version; + sha256 = "0mymvfvs8xggl4axvlj7kc1ksd9g94kaz6w1vdv0x2y5mqk93gx9"; + }; + + patches = [ + (fetchpatch { # https://github.com/OSGeo/PROJ/issues/2557 + name = "gie_self_tests-fail.diff"; # included in >= 8.0.1 + url = "https://github.com/OSGeo/PROJ/commit/6f1a3c4648bf06862dca0b3725cbb3b7ee0284e3.diff"; + sha256 = "0gapny0a9c3r0x9szjgn86sspjrrf4vwbija77b17w6ci5cq4pdf"; + }) + ]; + + postPatch = lib.optionalString (version == "7.2.1") '' + substituteInPlace CMakeLists.txt \ + --replace "MAJOR 7 MINOR 2 PATCH 0" "MAJOR 7 MINOR 2 PATCH 1" + ''; + + outputs = [ "out" "dev"]; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ sqlite libtiff curl ]; + + checkInputs = [ gtest ]; + + cmakeFlags = [ + "-DUSE_EXTERNAL_GTEST=ON" + ]; + + doCheck = true; + + meta = with lib; { + description = "Cartographic Projections Library"; + homepage = "https://proj4.org"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ vbgl dotlambda ]; + }; +} diff --git a/pkgs/development/libraries/proj/default.nix b/pkgs/development/libraries/proj/default.nix index f22878ec82901..caa270bcf60f8 100644 --- a/pkgs/development/libraries/proj/default.nix +++ b/pkgs/development/libraries/proj/default.nix @@ -7,33 +7,19 @@ , libtiff , curl , gtest -, fetchpatch }: stdenv.mkDerivation rec { pname = "proj"; - version = "7.2.1"; + version = "8.1.1"; src = fetchFromGitHub { owner = "OSGeo"; repo = "PROJ"; rev = version; - sha256 = "0mymvfvs8xggl4axvlj7kc1ksd9g94kaz6w1vdv0x2y5mqk93gx9"; + sha256 = "sha256-Z2nruyowC3NG4Wb8AFBL0PME/zp9D7SwQdMSl6VjH/w="; }; - patches = [ - (fetchpatch { # https://github.com/OSGeo/PROJ/issues/2557 - name = "gie_self_tests-fail.diff"; # included in >= 8.0.1 - url = "https://github.com/OSGeo/PROJ/commit/6f1a3c4648bf06862dca0b3725cbb3b7ee0284e3.diff"; - sha256 = "0gapny0a9c3r0x9szjgn86sspjrrf4vwbija77b17w6ci5cq4pdf"; - }) - ]; - - postPatch = lib.optionalString (version == "7.2.1") '' - substituteInPlace CMakeLists.txt \ - --replace "MAJOR 7 MINOR 2 PATCH 0" "MAJOR 7 MINOR 2 PATCH 1" - ''; - outputs = [ "out" "dev"]; nativeBuildInputs = [ cmake pkg-config ]; @@ -44,17 +30,14 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DUSE_EXTERNAL_GTEST=ON" + "-DRUN_NETWORK_DEPENDENT_TESTS=OFF" ]; - doCheck = stdenv.is64bit; - - preCheck = '' - export HOME=$TMPDIR - ''; + doCheck = true; meta = with lib; { description = "Cartographic Projections Library"; - homepage = "https://proj4.org"; + homepage = "https://proj.org/"; license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ vbgl dotlambda ]; diff --git a/pkgs/development/python-modules/cartopy/default.nix b/pkgs/development/python-modules/cartopy/default.nix index d3953137167a4..73d172941c2e9 100644 --- a/pkgs/development/python-modules/cartopy/default.nix +++ b/pkgs/development/python-modules/cartopy/default.nix @@ -8,14 +8,21 @@ buildPythonPackage rec { pname = "cartopy"; - version = "0.19.0.post1"; + version = "0.20.0"; src = fetchPypi { inherit version; pname = "Cartopy"; - sha256 = "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"; + sha256 = "eae58aff26806e63cf115b2bce9477cedc4aa9f578c5e477b2c25cfa404f2b7a"; }; + postPatch = '' + # https://github.com/SciTools/cartopy/issues/1880 + substituteInPlace lib/cartopy/tests/test_crs.py \ + --replace "test_osgb(" "dont_test_osgb(" \ + --replace "test_epsg(" "dont_test_epsg(" + ''; + buildInputs = [ geos proj ]; diff --git a/pkgs/development/python-modules/geopandas/default.nix b/pkgs/development/python-modules/geopandas/default.nix index 7bd45a2b46ee2..82acdbb8548e8 100644 --- a/pkgs/development/python-modules/geopandas/default.nix +++ b/pkgs/development/python-modules/geopandas/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder +{ lib, stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder , pandas, shapely, fiona, pyproj , pytestCheckHook, Rtree }: @@ -14,6 +14,19 @@ buildPythonPackage rec { sha256 = "sha256-58X562OkRzZ4UTNMTwXW4U5czoa5tbSMBCcE90DqbaE="; }; + patches = [ + (fetchpatch { + name = "skip-pandas-master-fillna-test.patch"; + url = "https://github.com/geopandas/geopandas/pull/1878.patch"; + sha256 = "1yw3i4dbhaq7f02n329b9y2cqxbwlz9db81mhgrfc7af3whwysdb"; + }) + (fetchpatch { + name = "fix-proj4strings-test.patch"; + url = "https://github.com/geopandas/geopandas/pull/1958.patch"; + sha256 = "0kzmpq5ry87yvhqr6gnh9p2606b06d3ynzjvw0hpp9fncczpc2yn"; + }) + ]; + propagatedBuildInputs = [ pandas shapely diff --git a/pkgs/development/python-modules/pyproj/001.proj.patch b/pkgs/development/python-modules/pyproj/001.proj.patch index 7b1680e980ebd..f62b70915dc56 100644 --- a/pkgs/development/python-modules/pyproj/001.proj.patch +++ b/pkgs/development/python-modules/pyproj/001.proj.patch @@ -1,19 +1,21 @@ -diff -Nur a/pyproj/datadir.py b/pyproj/datadir.py ---- a/pyproj/datadir.py 2021-04-10 18:26:52.829018483 +0100 -+++ b/pyproj/datadir.py 2021-04-10 18:44:59.155190614 +0100 -@@ -70,7 +70,7 @@ +diff --git a/pyproj/datadir.py b/pyproj/datadir.py +index 9ca1d25..4198490 100644 +--- a/pyproj/datadir.py ++++ b/pyproj/datadir.py +@@ -70,7 +70,7 @@ def get_data_dir() -> str: + global _VALIDATED_PROJ_DATA if _VALIDATED_PROJ_DATA is not None: return _VALIDATED_PROJ_DATA - global _USER_PROJ_DATA - internal_datadir = Path(__file__).absolute().parent / "proj_dir" / "share" / "proj" + internal_datadir = Path("@proj@/share/proj") proj_lib_dirs = os.environ.get("PROJ_LIB", "") prefix_datadir = Path(sys.prefix, "share", "proj") -diff -Nur a/setup.py b/setup.py ---- a/setup.py 2021-04-10 18:26:52.817018512 +0100 -+++ b/setup.py 2021-04-10 18:46:01.652324424 +0100 -@@ -11,7 +11,7 @@ +diff --git a/setup.py b/setup.py +index 6bb0c6c..b3d0321 100644 +--- a/setup.py ++++ b/setup.py +@@ -12,7 +12,7 @@ from setuptools import Extension, setup PROJ_MIN_VERSION = parse_version("7.2.0") CURRENT_FILE_PATH = Path(__file__).absolute().parent BASE_INTERNAL_PROJ_DIR = Path("proj_dir") @@ -22,7 +24,7 @@ diff -Nur a/setup.py b/setup.py def get_proj_version(proj_dir: Path) -> str: -@@ -150,7 +150,7 @@ +@@ -155,7 +155,7 @@ def get_extension_modules(): # By default we'll try to get options PROJ_DIR or the local version of proj proj_dir = get_proj_dir() library_dirs = get_proj_libdirs(proj_dir) @@ -31,21 +33,11 @@ diff -Nur a/setup.py b/setup.py proj_version = get_proj_version(proj_dir) check_proj_version(proj_version) -diff -Nur a/test/conftest.py b/test/conftest.py ---- a/test/conftest.py 2021-04-10 18:26:52.831018478 +0100 -+++ b/test/conftest.py 2021-04-10 18:37:01.605682432 +0100 -@@ -2,6 +2,7 @@ - from contextlib import contextmanager - from distutils.version import LooseVersion - from pathlib import Path -+import stat - - import pyproj - from pyproj.datadir import get_data_dir, get_user_data_dir, set_data_dir -diff -Nur a/test/test_cli.py b/test/test_cli.py ---- a/test/test_cli.py 2021-04-10 18:26:52.831018478 +0100 -+++ b/test/test_cli.py 2021-04-10 22:17:04.665088162 +0100 -@@ -14,7 +14,7 @@ +diff --git a/test/test_cli.py b/test/test_cli.py +index 7a696de..1b9b777 100644 +--- a/test/test_cli.py ++++ b/test/test_cli.py +@@ -14,7 +14,7 @@ from pyproj.sync import _load_grid_geojson from test.conftest import grids_available, proj_env, tmp_chdir PYPROJ_CLI_ENDPONTS = pytest.mark.parametrize( diff --git a/pkgs/development/python-modules/pyproj/default.nix b/pkgs/development/python-modules/pyproj/default.nix index 98e3e802c6ee3..9632fc5cb40b7 100644 --- a/pkgs/development/python-modules/pyproj/default.nix +++ b/pkgs/development/python-modules/pyproj/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "pyproj"; - version = "3.1.0"; + version = "3.2.1"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "pyproj4"; repo = "pyproj"; rev = version; - sha256 = "sha256-UN8cJk5Lgd+d2tKmFuF6QvKr36w1435RKovzGfMXi1E="; + sha256 = "sha256-r343TvXpSr+EMAbvzSUpsfipwP8TFmitOfT0gjgoO00="; }; # force pyproj to use ${proj} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ffec1ea5c52f7..2bf72ee2bc08f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18545,6 +18545,8 @@ with pkgs; proj = callPackage ../development/libraries/proj { }; + proj_7 = callPackage ../development/libraries/proj/7.nix { }; + proj-datumgrid = callPackage ../development/libraries/proj-datumgrid { }; proselint = callPackage ../tools/text/proselint { @@ -26952,7 +26954,14 @@ with pkgs; qimgv = libsForQt5.callPackage ../applications/graphics/qimgv { }; - qlandkartegt = libsForQt514.callPackage ../applications/misc/qlandkartegt {}; + qlandkartegt = libsForQt514.callPackage ../applications/misc/qlandkartegt { + gdal = gdal.override { + libgeotiff = libgeotiff.override { proj = proj_7; }; + libspatialite = libspatialite.override { proj = proj_7; }; + proj = proj_7; + }; + proj = proj_7; + }; garmindev = callPackage ../applications/misc/qlandkartegt/garmindev.nix {}; @@ -31116,10 +31125,7 @@ with pkgs; gildas = callPackage ../applications/science/astronomy/gildas { }; - gplates = callPackage ../applications/science/misc/gplates { - boost = boost160; - cgal = cgal.override { boost = boost160; }; - }; + gplates = libsForQt5.callPackage ../applications/science/misc/gplates { }; gravit = callPackage ../applications/science/astronomy/gravit { };