mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
82 lines
1.5 KiB
Nix
82 lines
1.5 KiB
Nix
{
|
|
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.hostPlatform.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;
|
|
};
|
|
}
|