17 stdenv.mkDerivation (finalAttrs: {
21 src = fetchFromGitHub {
24 rev = "v${finalAttrs.version}";
25 hash = "sha256-rB5oP03yaIzklwkGsIeS9ELbHOY9AObwjRrK9HBQFI4=";
29 substituteInPlace src/options_parser.cpp \
30 --replace-fail "config.json" "$out/share/tilemaker/config-openmaptiles.json" \
31 --replace-fail "process.lua" "$out/share/tilemaker/process-openmaptiles.lua"
32 substituteInPlace server/server.cpp \
33 --replace-fail "default_value(\"static\")" "default_value(\"$out/share/tilemaker/static\")"
36 nativeBuildInputs = [ cmake installShellFiles ];
38 buildInputs = [ boost lua protobuf_21 rapidjson shapelib sqlite zlib ];
40 cmakeFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
41 (lib.cmakeFeature "PROTOBUF_PROTOC_EXECUTABLE" "${buildPackages.protobuf}/bin/protoc");
43 env.NIX_CFLAGS_COMPILE = toString [ "-DTM_VERSION=${finalAttrs.version}" ];
46 installManPage ../docs/man/tilemaker.1
47 install -Dm644 ../resources/*.{json,lua} -t $out/share/tilemaker
48 cp -r ../server/static $out/share/tilemaker
51 passthru.tests.version = testers.testVersion {
52 package = finalAttrs.finalPackage;
53 command = "tilemaker --help";
57 description = "Make OpenStreetMap vector tiles without the stack";
58 homepage = "https://tilemaker.org/";
59 changelog = "https://github.com/systemed/tilemaker/blob/v${finalAttrs.version}/CHANGELOG.md";
60 license = licenses.free; # FTWPL
61 maintainers = with maintainers; [ sikmir ];
62 platforms = platforms.unix;
63 mainProgram = "tilemaker";