2023-08-04 22:07:22 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, buildGoModule }:
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "pg_tileserv";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.0.10";
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CrunchyData";
|
2023-08-04 22:07:22 +00:00
|
|
|
repo = "pg_tileserv";
|
2020-10-16 20:44:37 +00:00
|
|
|
rev = "v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-Y8GAmWpnXQGmFcy44wFUQGpA8OvT7u1rY1ZGNg1Qwgs=";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
patches = [
|
|
|
|
# Without this, we get error messages like:
|
|
|
|
# vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
|
|
|
|
# The patch was generated by changing "go 1.15" to "go 1.17" and executing `go mod tidy`.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/CrunchyData/pg_tileserv/commit/d8e01469344895267ead9fa35ee7bdb8f966a710.patch";
|
|
|
|
hash = "sha256-1P3dV8h51X+MEH2u1n6RxZvBPXBpQWrZBBCTOoCEWQU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorHash = "sha256-gXJFuvJ2d/e91TAtBzV3p2MwriJtUlIuNRw1+3iXJBA=";
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.programVersion=${version}" ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A very thin PostGIS-only tile server in Go";
|
|
|
|
homepage = "https://github.com/CrunchyData/pg_tileserv";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
};
|
|
|
|
}
|