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
55 changes: 47 additions & 8 deletions pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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";
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/misc/osm2xmap/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, libroxml, proj, libyamlcpp, boost } :
{ lib, stdenv, fetchFromGitHub, libroxml, proj_7, libyamlcpp, boost } :

stdenv.mkDerivation rec {
pname = "osm2xmap";
Expand All @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/survex/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
, wxGTK30-gtk3
, wxmac
, ffmpeg
, proj
, proj_7
, perl532
, unscii
, python
Expand All @@ -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 [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/xygrib/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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" ];

Expand Down
70 changes: 54 additions & 16 deletions pkgs/applications/science/misc/gplates/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
2 changes: 2 additions & 0 deletions pkgs/development/libraries/mapnik/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
}
58 changes: 58 additions & 0 deletions pkgs/development/libraries/proj/7.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
27 changes: 5 additions & 22 deletions pkgs/development/libraries/proj/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand All @@ -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 ];
Expand Down
11 changes: 9 additions & 2 deletions pkgs/development/python-modules/cartopy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
Expand Down
15 changes: 14 additions & 1 deletion pkgs/development/python-modules/geopandas/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder
, pandas, shapely, fiona, pyproj
, pytestCheckHook, Rtree }:

Expand All @@ -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
Expand Down
Loading