diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libspatialindex')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libspatialindex/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libspatialindex/default.nix b/nixpkgs/pkgs/development/libraries/libspatialindex/default.nix new file mode 100644 index 000000000000..16c98abf4417 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libspatialindex/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: + +stdenv.mkDerivation (finalAttrs: { + pname = "libspatialindex"; + version = "1.9.3"; + + src = fetchFromGitHub { + owner = "libspatialindex"; + repo = "libspatialindex"; + rev = finalAttrs.version; + hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc="; + }; + + 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="; + }) + ]; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + "-DSIDX_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}" + ]; + + doCheck = true; + + meta = with lib; { + description = "Extensible spatial index library in C++"; + homepage = "https://libspatialindex.org"; + license = licenses.mit; + maintainers = teams.geospatial.members; + platforms = platforms.unix; + }; +}) |