11 stdenv.mkDerivation (finalAttrs: {
16 url = "https://download.osgeo.org/geos/geos-${finalAttrs.version}.tar.bz2";
17 hash = "sha256-NkyIzPw4qlDPZccA57KuRwbtEDMmEoST2/dQx40TbSw=";
21 # Pull upstream fix of `gcc-13` build failure:
22 # https://github.com/libgeos/geos/pull/805
24 name = "gcc-13.patch";
25 url = "https://github.com/libgeos/geos/commit/bea3188be44075034fd349f5bb117c943bdb7fb1.patch";
26 hash = "sha256-dQT3Hf9YJchgjon/r46TLIXXbE6C0ZnewyvfYJea4jM=";
30 nativeBuildInputs = [ cmake ];
32 # https://github.com/libgeos/geos/issues/930
33 cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
34 "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;unit-geom-Envelope"
40 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
41 geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
45 description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
46 homepage = "https://libgeos.org";
47 license = licenses.lgpl21Only;
48 maintainers = teams.geospatial.members;
49 pkgConfigModules = [ "geos" ];
50 mainProgram = "geosop";