nixpkgs/pkgs/by-name/pm/pmtiles/package.nix
2024-10-25 09:00:26 +00:00

29 lines
819 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "pmtiles";
version = "1.22.1";
src = fetchFromGitHub {
owner = "protomaps";
repo = "go-pmtiles";
rev = "v${version}";
hash = "sha256-b473V082jM8d0XRn4tPzVGLryFNHn5Cab3IkNWve49s=";
};
vendorHash = "sha256-QDGs0L29W4QQBeIH1Z23nI/FYdu95kLnOAIZEWPOMWw=";
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=v${version}" ];
postInstall = ''
mv $out/bin/go-pmtiles $out/bin/pmtiles
'';
meta = with lib; {
description = "Single-file utility for creating and working with PMTiles archives";
homepage = "https://github.com/protomaps/go-pmtiles";
license = licenses.bsd3;
maintainers = teams.geospatial.members ++ (with maintainers; [ theaninova ]);
mainProgram = "pmtiles";
};
}