Merge pull request #295898 from sikmir/tilemaker
tilemaker: install assets
This commit is contained in:
commit
d53ce4c414
2 changed files with 25 additions and 12 deletions
|
@ -1,5 +1,18 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, buildPackages, cmake, installShellFiles
|
||||
, boost, lua, protobuf, rapidjson, shapelib, sqlite, zlib, testers }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, buildPackages
|
||||
, cmake
|
||||
, installShellFiles
|
||||
, boost
|
||||
, lua
|
||||
, protobuf_21
|
||||
, rapidjson
|
||||
, shapelib
|
||||
, sqlite
|
||||
, zlib
|
||||
, testers
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tilemaker";
|
||||
|
@ -13,23 +26,26 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/tilemaker.cpp \
|
||||
--replace "config.json" "$out/share/tilemaker/config-openmaptiles.json" \
|
||||
--replace "process.lua" "$out/share/tilemaker/process-openmaptiles.lua"
|
||||
substituteInPlace src/options_parser.cpp \
|
||||
--replace-fail "config.json" "$out/share/tilemaker/config-openmaptiles.json" \
|
||||
--replace-fail "process.lua" "$out/share/tilemaker/process-openmaptiles.lua"
|
||||
substituteInPlace server/server.cpp \
|
||||
--replace-fail "default_value(\"static\")" "default_value(\"$out/share/tilemaker/static\")"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake installShellFiles ];
|
||||
|
||||
buildInputs = [ boost lua protobuf rapidjson shapelib sqlite zlib ];
|
||||
buildInputs = [ boost lua protobuf_21 rapidjson shapelib sqlite zlib ];
|
||||
|
||||
cmakeFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
"-DPROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc";
|
||||
(lib.cmakeFeature "PROTOBUF_PROTOC_EXECUTABLE" "${buildPackages.protobuf}/bin/protoc");
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString [ "-DTM_VERSION=${finalAttrs.version}" ];
|
||||
|
||||
postInstall = ''
|
||||
installManPage ../docs/man/tilemaker.1
|
||||
install -Dm644 ../resources/* -t $out/share/tilemaker
|
||||
install -Dm644 ../resources/*.{json,lua} -t $out/share/tilemaker
|
||||
cp -r ../server/static $out/share/tilemaker
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
|
@ -44,5 +60,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
license = licenses.free; # FTWPL
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "tilemaker";
|
||||
};
|
||||
})
|
|
@ -35324,10 +35324,6 @@ with pkgs;
|
|||
|
||||
tijolo = callPackage ../applications/editors/tijolo { };
|
||||
|
||||
tilemaker = callPackage ../applications/misc/tilemaker {
|
||||
protobuf = protobuf_21;
|
||||
};
|
||||
|
||||
timbreid = callPackage ../applications/audio/pd-plugins/timbreid {
|
||||
fftw = fftwSinglePrec;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue