1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
3 stdenv.mkDerivation (finalAttrs: {
4 pname = "libspatialindex";
7 src = fetchFromGitHub {
8 owner = "libspatialindex";
9 repo = "libspatialindex";
10 rev = finalAttrs.version;
11 hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc=";
15 # Allow building static libs
17 name = "fix-static-lib-build.patch";
18 url = "https://github.com/libspatialindex/libspatialindex/commit/caee28d84685071da3ff3a4ea57ff0b6ae64fc87.patch";
19 hash = "sha256-nvTW/t9tw1ZLeycJY8nj7rQgZogxQb765Ca2b9NDvRo=";
23 nativeBuildInputs = [ cmake ];
26 "-DSIDX_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
32 description = "Extensible spatial index library in C++";
33 homepage = "https://libspatialindex.org";
34 license = licenses.mit;
35 platforms = platforms.unix;