Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 82 lines 1.7 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, autoreconfHook 6, apacheHttpd 7, apr 8, cairo 9, iniparser 10, mapnik 11, boost 12, icu 13, harfbuzz 14, libjpeg 15, libtiff 16, libwebp 17, proj 18, sqlite 19}: 20 21stdenv.mkDerivation rec { 22 pname = "mod_tile"; 23 version = "unstable-2017-01-08"; 24 25 src = fetchFromGitHub { 26 owner = "openstreetmap"; 27 repo = "mod_tile"; 28 rev = "e25bfdba1c1f2103c69529f1a30b22a14ce311f1"; 29 sha256 = "12c96avka1dfb9wxqmjd57j30w9h8yx4y4w34kyq6xnf6lwnkcxp"; 30 }; 31 32 patches = [ 33 # Pull upstream fix for -fno-common toolchains: 34 # https://github.com/openstreetmap/mod_tile/pull/202 35 (fetchpatch { 36 name = "fno-common"; 37 url = "https://github.com/openstreetmap/mod_tile/commit/a22065b8ae3c018820a5ca9bf8e2b2bb0a0bfeb4.patch"; 38 sha256 = "1ywfa14xn9aa96vx1adn1ndi29qpflca06x986bx9c5pqk761yz3"; 39 }) 40 ]; 41 42 # test is broken and I couldn't figure out a better way to disable it. 43 postPatch = '' 44 echo "int main(){return 0;}" > src/gen_tile_test.cpp 45 ''; 46 47 nativeBuildInputs = [ autoreconfHook ]; 48 buildInputs = [ 49 apacheHttpd 50 apr 51 cairo 52 iniparser 53 mapnik 54 boost 55 icu 56 harfbuzz 57 libjpeg 58 libtiff 59 libwebp 60 proj 61 sqlite 62 ]; 63 64 configureFlags = [ 65 "--with-apxs=${apacheHttpd.dev}/bin/apxs" 66 ]; 67 68 installPhase = '' 69 mkdir -p $out/modules 70 make install-mod_tile DESTDIR=$out 71 mv $out${apacheHttpd}/* $out 72 rm -rf $out/nix 73 ''; 74 75 meta = with lib; { 76 homepage = "https://github.com/openstreetmap/mod_tile"; 77 description = "Efficiently render and serve OpenStreetMap tiles using Apache and Mapnik"; 78 license = licenses.gpl2; 79 maintainers = with maintainers; [ jglukasik ]; 80 platforms = platforms.linux; 81 }; 82}