Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPerlPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 GD, 7 IPCShareLite, 8 JSON, 9 LWP, 10 mapnik, 11 boost, 12 nix-update-script, 13 pkg-config, 14}: 15 16buildPerlPackage rec { 17 pname = "Tirex"; 18 version = "0.7.1"; 19 20 src = fetchFromGitHub { 21 owner = "openstreetmap"; 22 repo = "tirex"; 23 tag = "v${version}"; 24 hash = "sha256-p2P19tifA/AvJatTzboyhtt7W1SwKJQzqpU4oDalfhU="; 25 }; 26 27 patches = [ 28 # Support Mapnik >= v4.0.0 (`mapnik/box2d.hpp` -> `mapnik/geometry/box2d.hpp`) 29 # https://github.com/openstreetmap/tirex/pull/54 30 (fetchpatch { 31 url = "https://github.com/openstreetmap/tirex/commit/5f131231c9c12e88793afba471b150ca8af8d587.patch"; 32 hash = "sha256-bnL1ZGy8ZNSZuCRbZn59qRVLg3TL0GjFYnhRKroeVO0="; 33 }) 34 # Support Mapnik >= v4.0.0 (no more mapnik-config) 35 ./use-pkg-config.patch 36 ]; 37 38 nativeBuildInputs = [ 39 pkg-config 40 ]; 41 42 buildInputs = [ 43 GD 44 IPCShareLite 45 JSON 46 LWP 47 mapnik 48 boost 49 ] 50 ++ mapnik.buildInputs; 51 52 installPhase = '' 53 install -m 755 -d $out/usr/libexec 54 make install DESTDIR=$out INSTALLOPTS="" 55 mv $out/$out/lib $out/$out/share $out 56 rmdir $out/$out $out/nix/store $out/nix 57 ''; 58 59 passthru.updateScript = nix-update-script { }; 60 61 meta = { 62 description = "Tools for running a map tile server"; 63 homepage = "https://wiki.openstreetmap.org/wiki/Tirex"; 64 maintainers = with lib.maintainers; [ jglukasik ]; 65 license = with lib.licenses; [ gpl2Only ]; 66 }; 67}