2024-04-09 12:30:33 +01:00
|
|
|
{ lib, buildGoModule, buildNpmPackage, fetchFromGitHub }:
|
|
|
|
let
|
2024-04-08 03:44:30 +01:00
|
|
|
version = "0.20.0";
|
2019-01-21 21:42:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "go-spatial";
|
2022-12-01 19:50:37 +00:00
|
|
|
repo = "tegola";
|
2020-06-06 09:29:08 +01:00
|
|
|
rev = "v${version}";
|
2024-04-08 03:44:30 +01:00
|
|
|
sha256 = "sha256-Jlpw3JaU5+DO7Z5qruEMoLRf95cPGd9Z+MeDGSgbMjc=";
|
2019-01-21 21:42:21 +00:00
|
|
|
};
|
|
|
|
|
2024-04-09 12:30:33 +01:00
|
|
|
frontend = buildNpmPackage {
|
|
|
|
pname = "tegola-ui";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = "${src}/ui";
|
|
|
|
|
|
|
|
npmDepsHash = "sha256-rhUdWt1X5/F0uvT8gI1T9ei6Y+HK1tKj2fuTKlMAwJk=";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r dist $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
buildGoModule {
|
|
|
|
pname = "tegola";
|
|
|
|
inherit version src;
|
|
|
|
|
2023-08-06 16:37:17 +01:00
|
|
|
vendorHash = null;
|
2022-05-21 08:55:25 +01:00
|
|
|
|
|
|
|
subPackages = [ "cmd/tegola" ];
|
2020-08-27 01:13:41 +01:00
|
|
|
|
2022-05-21 08:55:25 +01:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/go-spatial/tegola/internal/build.Version=${version}" ];
|
2020-09-27 05:20:00 +01:00
|
|
|
|
2024-04-09 12:30:33 +01:00
|
|
|
preBuild = ''
|
|
|
|
rm -rf ui/dist
|
|
|
|
cp -r ${frontend} ui/dist
|
|
|
|
go generate ./server
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.tegola.io/";
|
2019-01-21 21:42:21 +00:00
|
|
|
description = "Mapbox Vector Tile server";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "tegola";
|
2024-04-09 11:01:18 +01:00
|
|
|
maintainers = with maintainers; teams.geospatial.members ++ [ ingenieroariel ];
|
2019-01-21 21:42:21 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|