2022-03-22 20:03:34 +00:00
|
|
|
{ lib
|
2023-03-20 11:36:46 +00:00
|
|
|
, stdenv
|
2022-12-14 11:32:49 +00:00
|
|
|
, callPackage
|
|
|
|
, fetchurl
|
2023-02-11 13:55:46 +00:00
|
|
|
, testers
|
2024-05-17 08:38:46 +00:00
|
|
|
|
2023-03-20 11:36:46 +00:00
|
|
|
, cmake
|
2023-02-11 13:55:46 +00:00
|
|
|
}:
|
2007-12-03 16:01:51 +00:00
|
|
|
|
2023-02-11 13:55:46 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-02-27 17:51:17 +00:00
|
|
|
pname = "geos";
|
2024-09-24 21:27:38 +00:00
|
|
|
version = "3.13.0";
|
2007-12-03 16:01:51 +00:00
|
|
|
|
2009-03-06 23:21:28 +00:00
|
|
|
src = fetchurl {
|
2024-07-13 00:17:48 +00:00
|
|
|
url = "https://download.osgeo.org/geos/geos-${finalAttrs.version}.tar.bz2";
|
2024-09-24 21:27:38 +00:00
|
|
|
hash = "sha256-R+yD/zNNZyueRCZpXxXabmNoJEIUlx+r84b/jvbfOeQ=";
|
2009-03-06 23:21:28 +00:00
|
|
|
};
|
2007-12-03 16:01:51 +00:00
|
|
|
|
2022-06-23 23:49:53 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-08-08 17:12:13 +00:00
|
|
|
|
2024-04-14 18:04:05 +00:00
|
|
|
# https://github.com/libgeos/geos/issues/930
|
|
|
|
cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
|
|
|
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;unit-geom-Envelope"
|
|
|
|
];
|
|
|
|
|
2022-12-10 20:29:55 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-12-14 11:32:49 +00:00
|
|
|
passthru.tests = {
|
2023-10-16 04:28:52 +00:00
|
|
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
2022-12-14 11:32:49 +00:00
|
|
|
geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
|
|
|
|
};
|
2023-02-11 13:55:46 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2023-08-14 23:33:57 +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-02-27 17:51:17 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2023-11-17 15:50:08 +00:00
|
|
|
mainProgram = "geosop";
|
2023-06-19 15:23:53 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2023-02-11 13:55:46 +00:00
|
|
|
pkgConfigModules = [ "geos" ];
|
2023-11-17 15:50:08 +00:00
|
|
|
changelog = "https://github.com/libgeos/geos/releases/tag/${finalAttrs.finalPackage.version}";
|
2007-12-03 16:01:51 +00:00
|
|
|
};
|
2023-02-11 13:55:46 +00:00
|
|
|
})
|