Merge pull request #295898 from sikmir/tilemaker
tilemaker: install assets
This commit is contained in:
commit
d53ce4c414
@ -1,5 +1,18 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, buildPackages, cmake, installShellFiles
|
{ lib
|
||||||
, boost, lua, protobuf, rapidjson, shapelib, sqlite, zlib, testers }:
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildPackages
|
||||||
|
, cmake
|
||||||
|
, installShellFiles
|
||||||
|
, boost
|
||||||
|
, lua
|
||||||
|
, protobuf_21
|
||||||
|
, rapidjson
|
||||||
|
, shapelib
|
||||||
|
, sqlite
|
||||||
|
, zlib
|
||||||
|
, testers
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "tilemaker";
|
pname = "tilemaker";
|
||||||
@ -13,23 +26,26 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/tilemaker.cpp \
|
substituteInPlace src/options_parser.cpp \
|
||||||
--replace "config.json" "$out/share/tilemaker/config-openmaptiles.json" \
|
--replace-fail "config.json" "$out/share/tilemaker/config-openmaptiles.json" \
|
||||||
--replace "process.lua" "$out/share/tilemaker/process-openmaptiles.lua"
|
--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 ];
|
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)
|
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}" ];
|
env.NIX_CFLAGS_COMPILE = toString [ "-DTM_VERSION=${finalAttrs.version}" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
installManPage ../docs/man/tilemaker.1
|
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 {
|
passthru.tests.version = testers.testVersion {
|
||||||
@ -44,5 +60,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
license = licenses.free; # FTWPL
|
license = licenses.free; # FTWPL
|
||||||
maintainers = with maintainers; [ sikmir ];
|
maintainers = with maintainers; [ sikmir ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
mainProgram = "tilemaker";
|
||||||
};
|
};
|
||||||
})
|
})
|
@ -35324,10 +35324,6 @@ with pkgs;
|
|||||||
|
|
||||||
tijolo = callPackage ../applications/editors/tijolo { };
|
tijolo = callPackage ../applications/editors/tijolo { };
|
||||||
|
|
||||||
tilemaker = callPackage ../applications/misc/tilemaker {
|
|
||||||
protobuf = protobuf_21;
|
|
||||||
};
|
|
||||||
|
|
||||||
timbreid = callPackage ../applications/audio/pd-plugins/timbreid {
|
timbreid = callPackage ../applications/audio/pd-plugins/timbreid {
|
||||||
fftw = fftwSinglePrec;
|
fftw = fftwSinglePrec;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user