python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / libspatialindex / default.nix
blob455d42c3bb45c3f2b3215f0f8cec79049f63d577
1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "libspatialindex";
5   version = "1.9.3";
7   src = fetchFromGitHub {
8     owner = "libspatialindex";
9     repo = "libspatialindex";
10     rev = finalAttrs.version;
11     hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc=";
12   };
14   patches = [
15     # Allow building static libs
16     (fetchpatch {
17       name = "fix-static-lib-build.patch";
18       url = "https://github.com/libspatialindex/libspatialindex/commit/caee28d84685071da3ff3a4ea57ff0b6ae64fc87.patch";
19       hash = "sha256-nvTW/t9tw1ZLeycJY8nj7rQgZogxQb765Ca2b9NDvRo=";
20     })
21   ];
23   nativeBuildInputs = [ cmake ];
25   cmakeFlags = [
26     "-DSIDX_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
27   ];
29   doCheck = true;
31   meta = with lib; {
32     description = "Extensible spatial index library in C++";
33     homepage = "https://libspatialindex.org";
34     license = licenses.mit;
35     platforms = platforms.unix;
36   };