nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 ps,
20 jq,
21 memcached,
22 iana-etc,
23 nix-update-script,
24}:
25
26stdenv.mkDerivation rec {
27 pname = "mod_tile";
28 version = "0.8.1";
29
30 src = fetchFromGitHub {
31 owner = "openstreetmap";
32 repo = "mod_tile";
33 tag = "v${version}";
34 hash = "sha256-zDe+pFzK16K+8I0v1Z7p83PIgQlVDbjcnD4vzwdB1Oo=";
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 nativeCheckInputs = [
76 iana-etc
77 ps
78 ]
79 ++ lib.filter (pkg: !pkg.meta.broken) [
80 jq
81 memcached
82 ];
83
84 passthru.updateScript = nix-update-script { };
85
86 meta = {
87 homepage = "https://github.com/openstreetmap/mod_tile";
88 description = "Efficiently render and serve OpenStreetMap tiles using Apache and Mapnik";
89 license = lib.licenses.gpl2Plus;
90 maintainers = with lib.maintainers; [ jglukasik ];
91 platforms = lib.platforms.linux;
92 };
93}