Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

51 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libspatialindex";
version = "2.1.0";
src = fetchFromGitHub {
owner = "libspatialindex";
repo = "libspatialindex";
rev = finalAttrs.version;
hash = "sha256-a2CzRLHdQMnVhHZhwYsye4X644r8gp1m6vU2CJpSRpU=";
};
patches = [
./no-rpath-for-darwin.diff
];
postPatch = ''
patchShebangs test/
'';
nativeBuildInputs = [ cmake ];
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
# The cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR
# correctly (setting it to an absolute path causes include files to go to
# $out/$out/include, because the absolute path is interpreted with root
# at $out).
# See: https://github.com/NixOS/nixpkgs/issues/144170
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
doCheck = true;
meta = {
description = "Extensible spatial index library in C++";
homepage = "https://libspatialindex.org";
license = lib.licenses.mit;
teams = [ lib.teams.geospatial ];
platforms = lib.platforms.unix;
};
})