diff --git a/pkgs/by-name/ma/mapcache/package.nix b/pkgs/by-name/ma/mapcache/package.nix new file mode 100644 index 000000000000..e0859a91a2fe --- /dev/null +++ b/pkgs/by-name/ma/mapcache/package.nix @@ -0,0 +1,81 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + apacheHttpd, + apr, + aprutil, + curl, + db, + fcgi, + gdal, + geos, + libgeotiff, + libjpeg, + libpng, + libtiff, + pcre2, + pixman, + proj, + sqlite, + zlib, +}: + +stdenv.mkDerivation rec { + pname = "mapcache"; + version = "1.14.1"; + + src = fetchFromGitHub { + owner = "MapServer"; + repo = "mapcache"; + rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}"; + hash = "sha256-AwdZdOEq9SZ5VzuBllg4U1gdVxZ9IVdqiDrn3QuRdCk="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + apacheHttpd + apr + aprutil + curl + db + fcgi + gdal + geos + libgeotiff + libjpeg + libpng + libtiff + pcre2 + pixman + proj + sqlite + zlib + ]; + + cmakeFlags = [ + (lib.cmakeBool "WITH_BERKELEY_DB" true) + (lib.cmakeBool "WITH_MEMCACHE" true) + (lib.cmakeBool "WITH_TIFF" true) + (lib.cmakeBool "WITH_GEOTIFF" true) + (lib.cmakeBool "WITH_PCRE2" true) + (lib.cmakeFeature "APACHE_MODULE_DIR" "${placeholder "out"}/modules") + ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-std=c99"; + + meta = { + description = "Server that implements tile caching to speed up access to WMS layers"; + homepage = "https://mapserver.org/mapcache/"; + changelog = "https://www.mapserver.org/development/changelog/mapcache/"; + license = lib.licenses.mit; + maintainers = lib.teams.geospatial.members; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/servers/geospatial/mapcache/default.nix b/pkgs/servers/geospatial/mapcache/default.nix deleted file mode 100644 index 3fa78b0c10f9..000000000000 --- a/pkgs/servers/geospatial/mapcache/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config -, apacheHttpd, apr, aprutil, curl, db, fcgi, gdal, geos -, libgeotiff, libjpeg, libpng, libtiff, pcre, pixman, proj, sqlite, zlib -}: - -stdenv.mkDerivation rec { - pname = "mapcache"; - version = "1.14.0"; - - src = fetchFromGitHub { - owner = "MapServer"; - repo = pname; - rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}"; - sha256 = "sha256-+QP4xXhP+MNqnhMUtMdtKrcuJ0M2BXWu3mbxXzj5ybc="; - }; - - nativeBuildInputs = [ - cmake - pkg-config - ]; - - buildInputs = [ - apacheHttpd - apr - aprutil - curl - db - fcgi - gdal - geos - libgeotiff - libjpeg - libpng - libtiff - pcre - pixman - proj - sqlite - zlib - ]; - - cmakeFlags = [ - "-DWITH_BERKELEY_DB=ON" - "-DWITH_MEMCACHE=ON" - "-DWITH_TIFF=ON" - "-DWITH_GEOTIFF=ON" - "-DWITH_PCRE=ON" - "-DAPACHE_MODULE_DIR=${placeholder "out"}/modules" - ]; - - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-std=c99"; - - meta = with lib; { - description = "Server that implements tile caching to speed up access to WMS layers"; - homepage = "https://mapserver.org/mapcache/"; - changelog = "https://www.mapserver.org/development/changelog/mapcache/"; - license = licenses.mit; - maintainers = teams.geospatial.members; - platforms = platforms.unix; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d23396bdba1f..b88a723c156f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26183,8 +26183,6 @@ with pkgs; fit-trackee = callPackage ../servers/geospatial/fit-trackee { }; - mapcache = callPackage ../servers/geospatial/mapcache { }; - mapproxy = callPackage ../servers/geospatial/mapproxy { }; mapserver = callPackage ../servers/geospatial/mapserver { };