2022-09-02 07:18:02 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
|
2013-07-18 09:40:23 +00:00
|
|
|
|
2022-09-02 07:18:02 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "libspatialindex";
|
2022-09-02 07:18:02 +00:00
|
|
|
version = "1.9.3";
|
2013-07-18 09:40:23 +00:00
|
|
|
|
2022-09-02 07:18:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libspatialindex";
|
|
|
|
repo = "libspatialindex";
|
|
|
|
rev = finalAttrs.version;
|
|
|
|
hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc=";
|
2013-07-18 09:40:23 +00:00
|
|
|
};
|
|
|
|
|
2022-09-02 07:18:02 +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=";
|
|
|
|
})
|
|
|
|
];
|
2013-07-18 09:40:23 +00:00
|
|
|
|
2022-09-02 07:18:02 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2023-11-30 17:50:59 +00:00
|
|
|
"-DSIDX_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
2022-09-02 07:18:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2013-07-18 09:40:23 +00:00
|
|
|
description = "Extensible spatial index library in C++";
|
2022-09-02 07:18:02 +00:00
|
|
|
homepage = "https://libspatialindex.org";
|
|
|
|
license = licenses.mit;
|
2023-11-15 07:02:30 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2022-09-02 07:18:02 +00:00
|
|
|
platforms = platforms.unix;
|
2013-07-18 09:40:23 +00:00
|
|
|
};
|
2022-09-02 07:18:02 +00:00
|
|
|
})
|