nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 29 lines 865 B view raw
1{ stdenv, buildPythonPackage, fetchPypi, libspatialindex, numpy }: 2 3buildPythonPackage rec { 4 pname = "Rtree"; 5 version = "0.9.3"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "55c046a98e8d84235792de1f18635f680d7b4085264fbced6b073f28fcbe353a"; 10 }; 11 12 propagatedBuildInputs = [ libspatialindex ]; 13 14 patchPhase = '' 15 substituteInPlace rtree/core.py --replace \ 16 "find_library('spatialindex_c')" "'${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}'" 17 ''; 18 19 # Tests appear to be broken due to mysterious memory unsafe issues. See #36760 20 doCheck = false; 21 checkInputs = [ numpy ]; 22 23 meta = with stdenv.lib; { 24 description = "R-Tree spatial index for Python GIS"; 25 homepage = https://toblerity.org/rtree/; 26 license = licenses.lgpl21; 27 maintainers = with maintainers; [ bgamari ]; 28 }; 29}