2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
2023-03-30 22:05:00 +00:00
|
|
|
, stdenv
|
2023-10-09 19:29:22 +00:00
|
|
|
, callPackage
|
|
|
|
, fetchurl
|
2023-02-16 17:41:37 +00:00
|
|
|
, testers
|
2024-06-05 15:53:02 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
, cmake
|
2023-02-16 17:41:37 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-03-09 03:18:52 +00:00
|
|
|
pname = "geos";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "3.12.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-07-27 06:49:29 +00:00
|
|
|
url = "https://download.osgeo.org/geos/geos-${finalAttrs.version}.tar.bz2";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-NMd3C/AJDuiEiK+Ydn0I53nxJPozQ34Kq+yKvUYJ/sY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# https://github.com/libgeos/geos/issues/930
|
2024-09-26 11:04:55 +00:00
|
|
|
cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
2024-04-21 15:54:59 +00:00
|
|
|
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;unit-geom-Envelope"
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests = {
|
2023-10-19 13:55:26 +00:00
|
|
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
2023-10-09 19:29:22 +00:00
|
|
|
geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
|
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2023-08-22 20:05:09 +00:00
|
|
|
description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
|
|
|
|
homepage = "https://libgeos.org";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "geosop";
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2023-02-16 17:41:37 +00:00
|
|
|
pkgConfigModules = [ "geos" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/libgeos/geos/releases/tag/${finalAttrs.finalPackage.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
})
|