mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
tegola: enable viewer
This commit is contained in:
parent
64483813c2
commit
ac9cc54ca0
@ -1,7 +1,5 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "tegola";
|
||||
{ lib, buildGoModule, buildNpmPackage, fetchFromGitHub }:
|
||||
let
|
||||
version = "0.20.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@ -11,12 +9,35 @@ buildGoModule rec {
|
||||
sha256 = "sha256-Jlpw3JaU5+DO7Z5qruEMoLRf95cPGd9Z+MeDGSgbMjc=";
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "cmd/tegola" ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X github.com/go-spatial/tegola/internal/build.Version=${version}" ];
|
||||
|
||||
preBuild = ''
|
||||
rm -rf ui/dist
|
||||
cp -r ${frontend} ui/dist
|
||||
go generate ./server
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.tegola.io/";
|
||||
description = "Mapbox Vector Tile server";
|
||||
|
Loading…
Reference in New Issue
Block a user