commit a51ccf6932e7a51cc5264edd777c04081efdfa79
parent d4106e33b6751efb43f887edc0e2bcfacefc3513
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Thu, 22 Apr 2021 20:56:27 +0300
Up
Diffstat:
6 files changed, 91 insertions(+), 79 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -83,20 +83,6 @@
"url": "https://github.com/bopen/elevation/archive/6819b2931f5de412bd6b18bd07f1674f71fa35e5.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "elevation-server": {
- "branch": "master",
- "builtin": false,
- "date": "2020-12-05T18:04:12Z",
- "description": "The server providing elevation data for https://nakarte.me written in go",
- "homepage": "https://github.com/wladich/elevation_server",
- "owner": "wladich",
- "repo": "elevation_server",
- "rev": "ed023fee8e7a4347f240d35fc0c855fdfff0464f",
- "sha256": "0187ygkk5g2xz2vfnl49xbgqgvkbnxy18xvakfb5y8fahdp42sns",
- "type": "tarball",
- "url": "https://github.com/wladich/elevation_server/archive/ed023fee8e7a4347f240d35fc0c855fdfff0464f.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"foma": {
"branch": "master",
"builtin": false,
@@ -191,20 +177,6 @@
"url": "https://github.com/glauth/glauth/archive/5681dc4d0236c49e549ae7804ef2f4e4455340e4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "go-staticmaps": {
- "branch": "master",
- "builtin": false,
- "date": "2021-02-06T12:36:33Z",
- "description": "A go (golang) library and command line tool to render static map images using OpenStreetMap tiles",
- "homepage": "https://github.com/flopp/go-staticmaps",
- "owner": "flopp",
- "repo": "go-staticmaps",
- "rev": "1292f1734c3cad612ff67b4598f1a0cdc3d6fa7c",
- "sha256": "1vhl8vv2136a83n9js5098r6irw2cad0yl7zq3i3zwg62jjdaygd",
- "type": "tarball",
- "url": "https://github.com/flopp/go-staticmaps/archive/1292f1734c3cad612ff67b4598f1a0cdc3d6fa7c.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"gpx-interpolate": {
"branch": "master",
"builtin": false,
@@ -289,20 +261,6 @@
"url": "https://notabug.org/irdvo/gpxtools/archive/919fb5953af8de1e71f61244eb70dd56b670a429.tar.gz",
"url_template": "https://notabug.org/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "gpxtrackposter": {
- "branch": "master",
- "builtin": false,
- "date": "2021-03-04T17:23:25Z",
- "description": "Create a visually appealing poster from your GPX tracks",
- "homepage": "https://github.com/flopp/GpxTrackPoster",
- "owner": "flopp",
- "repo": "GpxTrackPoster",
- "rev": "0ea91a7231cb9aa3c11b3c1d6715cfc7c35cd6e6",
- "sha256": "08w4zlc6f69x0cidd13m5lknj1bgsa57rmv6rr2sh1g68v47rb0b",
- "type": "tarball",
- "url": "https://github.com/flopp/GpxTrackPoster/archive/0ea91a7231cb9aa3c11b3c1d6715cfc7c35cd6e6.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"gt-bash-client": {
"branch": "master",
"builtin": false,
@@ -580,20 +538,6 @@
"url": "https://github.com/bmpix/PolyVectorization/archive/bceb8e2a08cca29cef1df074eb1a1f6450cc163f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "py-staticmaps": {
- "branch": "master",
- "builtin": false,
- "date": "2021-03-08T19:58:16Z",
- "description": "A python module to create static map images with markers, geodesic lines, etc.",
- "homepage": "https://github.com/flopp/py-staticmaps",
- "owner": "flopp",
- "repo": "py-staticmaps",
- "rev": "d8f378e1cc4a8229645af1199adbdcbfe91a29b4",
- "sha256": "01xkm5yrhix2g0y9f50x6yxybfzsbw1wpm2rjym2k9303hi1d2av",
- "type": "tarball",
- "url": "https://github.com/flopp/py-staticmaps/archive/d8f378e1cc4a8229645af1199adbdcbfe91a29b4.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"pyephem": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/nakarte/elevation_server/default.nix b/pkgs/nakarte/elevation_server/default.nix
@@ -1,10 +1,15 @@
-{ lib, buildGoPackage, lz4, sources }:
+{ lib, fetchFromGitHub, buildGoPackage, lz4 }:
buildGoPackage rec {
- pname = "elevation-server-unstable";
- version = lib.substring 0 10 sources.elevation-server.date;
+ pname = "elevation_server";
+ version = "1.2.0";
- src = sources.elevation-server;
+ src = fetchFromGitHub {
+ owner = "wladich";
+ repo = pname;
+ rev = version;
+ sha256 = "sha256-2mpBboPKIV+Wm2p3FHy3a+6H3+qJUOu2+F28MufzBwU=";
+ };
goPackagePath = "github.com/wladich/elevation_server";
@@ -15,7 +20,8 @@ buildGoPackage rec {
goDeps = ./deps.nix;
meta = with lib; {
- inherit (sources.elevation-server) description homepage;
+ description = "The server providing elevation data";
+ homepage = "https://github.com/wladich/elevation_server";
license = licenses.free;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/tools/geo/go-staticmaps/default.nix b/pkgs/tools/geo/go-staticmaps/default.nix
@@ -1,15 +1,23 @@
-{ lib, buildGoModule, sources }:
+{ lib, buildGoModule, fetchFromGitHub }:
-buildGoModule {
+buildGoModule rec {
pname = "go-staticmaps";
- version = lib.substring 0 10 sources.go-staticmaps.date;
+ version = "2021-04-12";
- src = sources.go-staticmaps;
+ src = fetchFromGitHub {
+ owner = "flopp";
+ repo = pname;
+ rev = "9eef5d84e2f2fd705ebb1cd0c0601cf2301ad9ca";
+ sha256 = "sha256-HH7HjVdv9yTpE7on6PDXqiUSGQzSqyh5/+psFm53+WQ=";
+ };
+
+ patches = [ ./extra-tileproviders.patch ];
- vendorSha256 = "0xv9s53vw2m8qn65gn4jp3h42l31llisvmhlk9jsj6qs2ccqqxqw";
+ vendorSha256 = "sha256-HHeMGRMaG6llmhTWrSOlYVBB4LiS2FeMxagKvkfRaXc=";
meta = with lib; {
- inherit (sources.go-staticmaps) description homepage;
+ description = "A go (golang) library and command line tool to render static map images using OpenStreetMap tiles";
+ homepage = "https://github.com/flopp/go-staticmaps";
license = licenses.mit;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/tools/geo/go-staticmaps/extra-tileproviders.patch b/pkgs/tools/geo/go-staticmaps/extra-tileproviders.patch
@@ -0,0 +1,42 @@
+diff --git i/tile_provider.go w/tile_provider.go
+index a4b7f9b..62a56b6 100644
+--- i/tile_provider.go
++++ w/tile_provider.go
+@@ -143,6 +143,28 @@ func NewTileProviderArcgisWorldImagery() *TileProvider {
+ return t
+ }
+
++// NewTileProviderOpenTopoMapRu creates a TileProvider struct for opentopomap's tile service
++func NewTileProviderOpenTopoMapRu() *TileProvider {
++ t := new(TileProvider)
++ t.Name = "opentopomapru"
++ t.Attribution = "Maps (c) OpenTopoMap.ru [CC-BY-SA]; Data (c) OSM and contributors [ODbL]; Data (c) SRTM"
++ t.TileSize = 256
++ t.URLPattern = "https://tile-%[1]s.opentopomap.ru/%[2]d/%[3]d/%[4]d.png"
++ t.Shards = []string{"a", "b", "c"}
++ return t
++}
++
++// NewTileProviderInkatlas creates a TileProvider struct for inkatlas's tile service
++func NewTileProviderInkatlas() *TileProvider {
++ t := new(TileProvider)
++ t.Name = "inkatlas"
++ t.Attribution = "Maps (c) Inkatlas OÜ; Data (c) OSM and contributors [ODbL]; Data (c) SRTM"
++ t.TileSize = 256
++ t.URLPattern = "https://tile.inkatlas.com/inkatlas/outdoor/%[2]d/%[3]d/%[4]d.png"
++ t.Shards = []string{}
++ return t
++}
++
+ // GetTileProviders returns a map of all available TileProviders
+ func GetTileProviders() map[string]*TileProvider {
+ m := make(map[string]*TileProvider)
+@@ -161,6 +183,8 @@ func GetTileProviders() map[string]*TileProvider {
+ NewTileProviderCartoLight(),
+ NewTileProviderCartoDark(),
+ NewTileProviderArcgisWorldImagery(),
++ NewTileProviderOpenTopoMapRu(),
++ NewTileProviderInkatlas(),
+ }
+
+ for _, tp := range list {
diff --git a/pkgs/tools/geo/gpxtrackposter/default.nix b/pkgs/tools/geo/gpxtrackposter/default.nix
@@ -1,10 +1,15 @@
-{ lib, python3Packages, s2sphere, sources }:
+{ lib, fetchFromGitHub, python3Packages, s2sphere }:
-python3Packages.buildPythonApplication {
- pname = "gpxtrackposter-unstable";
- version = lib.substring 0 10 sources.gpxtrackposter.date;
+python3Packages.buildPythonApplication rec {
+ pname = "gpxtrackposter";
+ version = "2021-04-01";
- src = sources.gpxtrackposter;
+ src = fetchFromGitHub {
+ owner = "flopp";
+ repo = pname;
+ rev = "545c551b808fece43ff199e006d8a1c399536a05";
+ sha256 = "sha256-2if0e74mYItTM7tYc2OS2EhZu3gnZjfkT5kzLnacH7Y=";
+ };
patches = [ ./fix-localedir.patch ];
@@ -45,7 +50,8 @@ python3Packages.buildPythonApplication {
postInstall = "rm -fr $out/requirements*.txt";
meta = with lib; {
- inherit (sources.gpxtrackposter) description homepage;
+ description = "Create a visually appealing poster from your GPX tracks";
+ homepage = "https://github.com/flopp/GpxTrackPoster";
license = licenses.mit;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/tools/geo/py-staticmaps/default.nix b/pkgs/tools/geo/py-staticmaps/default.nix
@@ -1,17 +1,23 @@
-{ lib, python3Packages, s2sphere, sources }:
+{ lib, fetchFromGitHub, python3Packages, s2sphere }:
-python3Packages.buildPythonApplication {
- pname = "py-staticmaps-unstable";
- version = lib.substring 0 10 sources.py-staticmaps.date;
+python3Packages.buildPythonApplication rec {
+ pname = "py-staticmaps";
+ version = "0.3.0";
- src = sources.py-staticmaps;
+ src = fetchFromGitHub {
+ owner = "flopp";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "sha256-vW457HbdDDhfz8hsvEN3/HJmIHKdrRDVNuhSpZXoZ78=";
+ };
propagatedBuildInputs = with python3Packages; [ appdirs geographiclib pillow pycairo python-slugify requests s2sphere svgwrite ];
checkInputs = with python3Packages; [ pytestCheckHook ];
meta = with lib; {
- inherit (sources.py-staticmaps) description homepage;
+ description = "A python module to create static map images with markers, geodesic lines, etc";
+ homepage = "https://github.com/flopp/py-staticmaps";
license = licenses.mit;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;