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
|
|
|
|
, fetchpatch
|
|
|
|
, fetchurl
|
2023-02-16 17:41:37 +00:00
|
|
|
, testers
|
2023-10-09 19:29:22 +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";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "3.11.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-16 17:41:37 +00:00
|
|
|
url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-sfB3ZpSBxaPmKv/EnpbrBvKBmHpdNv2rIlIX5bgl5Mw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# Pull upstream fix of `gcc-13` build failure:
|
|
|
|
# https://github.com/libgeos/geos/pull/805
|
|
|
|
(fetchpatch {
|
|
|
|
name = "gcc-13.patch";
|
|
|
|
url = "https://github.com/libgeos/geos/commit/bea3188be44075034fd349f5bb117c943bdb7fb1.patch";
|
|
|
|
hash = "sha256-dQT3Hf9YJchgjon/r46TLIXXbE6C0ZnewyvfYJea4jM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
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;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2023-02-16 17:41:37 +00:00
|
|
|
pkgConfigModules = [ "geos" ];
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "geosop";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
})
|