From a4ebcee81e196b5bfe987dbcfaf9882c195ecc12 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Fri, 6 May 2022 18:06:52 +0300 Subject: [PATCH] tilemaker: init at 2.2.0 --- pkgs/applications/misc/tilemaker/default.nix | 40 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/misc/tilemaker/default.nix diff --git a/pkgs/applications/misc/tilemaker/default.nix b/pkgs/applications/misc/tilemaker/default.nix new file mode 100644 index 000000000000..cc87c529e34d --- /dev/null +++ b/pkgs/applications/misc/tilemaker/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchFromGitHub, buildPackages, cmake, installShellFiles +, boost, lua, protobuf, rapidjson, shapelib, sqlite, zlib }: + +stdenv.mkDerivation rec { + pname = "tilemaker"; + version = "2.2.0"; + + src = fetchFromGitHub { + owner = "systemed"; + repo = pname; + rev = "v${version}"; + hash = "sha256-st6WDCk1RZ2lbfrudtcD+zenntyTMRHrIXw3nX5FHOU="; + }; + + postPatch = '' + substituteInPlace src/tilemaker.cpp \ + --replace "config.json" "$out/share/tilemaker/config-openmaptiles.json" \ + --replace "process.lua" "$out/share/tilemaker/process-openmaptiles.lua" + ''; + + nativeBuildInputs = [ cmake installShellFiles ]; + + buildInputs = [ boost lua protobuf rapidjson shapelib sqlite zlib ]; + + cmakeFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) + "-DPROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"; + + postInstall = '' + installManPage ../docs/man/tilemaker.1 + install -Dm644 ../resources/* -t $out/share/tilemaker + ''; + + meta = with lib; { + description = "Make OpenStreetMap vector tiles without the stack"; + homepage = "https://tilemaker.org/"; + license = licenses.free; # FTWPL + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c89dea3449c0..603a7c80ef58 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29934,6 +29934,8 @@ with pkgs; tig = callPackage ../applications/version-management/git-and-tools/tig { }; + tilemaker = callPackage ../applications/misc/tilemaker { }; + timbreid = callPackage ../applications/audio/pd-plugins/timbreid { fftw = fftwSinglePrec; };