Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 84 lines 1.7 kB view raw
1{ fetchFromGitHub 2, lib 3, stdenv 4, cmake 5, pkg-config 6, apacheHttpd 7, apr 8, aprutil 9, boost 10, cairo 11, curl 12, glib 13, harfbuzz 14, icu 15, iniparser 16, libmemcached 17, mapnik 18, nix-update-script 19}: 20 21stdenv.mkDerivation rec { 22 pname = "mod_tile"; 23 version = "0.7.1"; 24 25 src = fetchFromGitHub { 26 owner = "openstreetmap"; 27 repo = "mod_tile"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-zXUwTG8cqAkY5MC1jAc2TtMgNMQPLc5nc22okVYP4ME="; 30 }; 31 32 patches = [ 33 # Support Mapnik >= v4.0.0-rc2 (boost:optional no longer used) 34 ./mod_tile-std_optional.patch 35 ]; 36 37 nativeBuildInputs = [ 38 cmake 39 pkg-config 40 ]; 41 42 buildInputs = [ 43 apacheHttpd 44 apr 45 aprutil 46 boost 47 cairo 48 curl 49 glib 50 harfbuzz 51 icu 52 iniparser 53 libmemcached 54 mapnik 55 ]; 56 57 enableParallelBuilding = true; 58 59 # Explicitly specify directory paths 60 cmakeFlags = [ 61 (lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin") 62 (lib.cmakeFeature "CMAKE_INSTALL_MANDIR" "share/man") 63 (lib.cmakeFeature "CMAKE_INSTALL_MODULESDIR" "modules") 64 (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "") 65 (lib.cmakeBool "ENABLE_TESTS" doCheck) 66 ]; 67 68 # And use DESTDIR to define the install destination 69 installFlags = [ "DESTDIR=$(out)" ]; 70 71 doCheck = true; 72 # Do not run tests in parallel 73 enableParallelChecking = false; 74 75 passthru.updateScript = nix-update-script { }; 76 77 meta = with lib; { 78 homepage = "https://github.com/openstreetmap/mod_tile"; 79 description = "Efficiently render and serve OpenStreetMap tiles using Apache and Mapnik"; 80 license = licenses.gpl2Plus; 81 maintainers = with maintainers; [ jglukasik ]; 82 platforms = platforms.linux; 83 }; 84}