Merge pull request #114578 from fabaff/fix-shapely

This commit is contained in:
Sandro 2021-02-28 16:37:51 +01:00 committed by GitHub
commit e1d350c1bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 12 deletions

View file

@ -1,11 +1,12 @@
{ lib, stdenv, fetchurl, python }:
stdenv.mkDerivation rec {
name = "geos-3.9.0";
pname = "geos";
version = "3.9.1";
src = fetchurl {
url = "https://download.osgeo.org/geos/${name}.tar.bz2";
sha256 = "sha256-vYCCzxL0XydjAZPHi9taPLqEe4HnKyAmg1bCpPwGUmk=";
url = "https://download.osgeo.org/geos/${pname}-${version}.tar.bz2";
sha256 = "sha256-fmMFB9ysncB1ZdJJom8GoVyfWwxS3SkSmg49OB1+OCo=";
};
enableParallelBuilding = true;
@ -18,6 +19,6 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "C++ port of the Java Topology Suite (JTS)";
homepage = "https://trac.osgeo.org/geos";
license = licenses.lgpl21;
license = licenses.lgpl21Only;
};
}

View file

@ -34,7 +34,7 @@ buildPythonPackage rec {
pytestCheckHook
];
# environment variable used in shapely/_buildcfg.py
# Environment variable used in shapely/_buildcfg.py
GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}";
patches = [
@ -48,18 +48,12 @@ buildPythonPackage rec {
".travis.yml"
];
})
# Patch to search form GOES .so/.dylib files in a Nix-aware way
(substituteAll {
src = ./library-paths.patch;
libgeos_c = GEOS_LIBRARY_PATH;
libc = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6";
})
# included in next release.
(fetchpatch {
url = "https://github.com/Toblerity/Shapely/commit/ea5b05a0c87235d3d8f09930ad47c396a76c8b0c.patch";
sha256 = "sha256-egdydlV+tpXosSQwQFHaXaeBhXEHAs+mn7vLUDpvybA=";
})
];
preCheck = ''
@ -70,9 +64,12 @@ buildPythonPackage rec {
"test_collection"
];
pythonImportsCheck = [ "shapely" ];
meta = with lib; {
description = "Geometric objects, predicates, and operations";
maintainers = with maintainers; [ knedlsepp ];
homepage = "https://pypi.python.org/pypi/Shapely/";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ knedlsepp ];
};
}