1 { lib, fetchFromGitHub, buildGoModule }:
4 pname = "pg_featureserv";
7 src = fetchFromGitHub {
11 sha256 = "sha256-GsloUZFgrOrJc23vKv+8iSeyIEKblaukPSCpZGRtSL4=";
14 vendorHash = "sha256-BHiEVyi3FXPovYy3iDP8q+y+LgfI4ElDPVZexd7nnuo=";
17 # fix default configuration file location
19 internal/conf/config.go \
20 --replace-fail "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
22 # fix assets location in configuration file
24 config/pg_featureserv.toml.example \
25 --replace-fail "AssetsPath = \"./assets\"" "AssetsPath = \"$out/share/assets\""
28 ldflags = [ "-s" "-w" "-X github.com/CrunchyData/pg_featureserv/conf.setVersion=${version}" ];
32 cp -r assets $out/share
34 mkdir -p $out/share/config
35 cp config/pg_featureserv.toml.example $out/share/config/pg_featureserv.toml
39 description = "Lightweight RESTful Geospatial Feature Server for PostGIS in Go";
40 mainProgram = "pg_featureserv";
41 homepage = "https://github.com/CrunchyData/pg_featureserv";
42 license = licenses.asl20;
43 maintainers = teams.geospatial.members;