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