2022-09-09 14:08:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libspatialindex";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.9.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libspatialindex";
|
|
|
|
repo = "libspatialindex";
|
|
|
|
rev = finalAttrs.version;
|
|
|
|
hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
patches = [
|
|
|
|
# Allow building static libs
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-static-lib-build.patch";
|
|
|
|
url = "https://github.com/libspatialindex/libspatialindex/commit/caee28d84685071da3ff3a4ea57ff0b6ae64fc87.patch";
|
|
|
|
hash = "sha256-nvTW/t9tw1ZLeycJY8nj7rQgZogxQb765Ca2b9NDvRo=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DSIDX_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extensible spatial index library in C++";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://libspatialindex.org";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
})
|