Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libspatialindex: 1.9.3 -> 2.0.0 #318245

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions pkgs/development/libraries/libspatialindex/default.nix
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
{ lib, stdenv, fetchFromGitHub, cmake }:

stdenv.mkDerivation (finalAttrs: {
pname = "libspatialindex";
version = "1.9.3";
version = "2.0.0";

src = fetchFromGitHub {
owner = "libspatialindex";
repo = "libspatialindex";
rev = finalAttrs.version;
hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc=";
hash = "sha256-hZyAXz1ddRStjZeqDf4lYkV/g0JLqLy7+GrSUh75k20=";
};

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=";
})
];
postPatch = ''
patchShebangs test/
'';

nativeBuildInputs = [ cmake ];

cmakeFlags = [
"-DSIDX_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
(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;
Expand Down