nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 47aa4cd6db735c398571f008181239744c29be00
parent 1dbc765165660aa91d813705f06cf6885efba2bf
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sat,  9 Jan 2021 01:21:16 +0300

Add osmcoastline

Diffstat:
Mnix/sources.json | 14++++++++++++++
Mpkgs/default.nix | 1+
Apkgs/tools/geo/osmcoastline/default.nix | 49+++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/nix/sources.json b/nix/sources.json @@ -871,6 +871,20 @@ "url": "https://github.com/liosha/osm2mp/archive/748f93792ead174ad0e94a183a173ef3fcacf200.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "osmcoastline": { + "branch": "master", + "builtin": false, + "date": "2021-01-08T14:38:44Z", + "description": "Extracts coastline data from OpenStreetMap planet file", + "homepage": "https://osmcode.org/osmcoastline/", + "owner": "osmcode", + "repo": "osmcoastline", + "rev": "56371668ebb6261009f35a7411a8fbcc83aabfe0", + "sha256": "0q7pmyxdkylydxhwcwnvcig6i96wss825hv9w971455qickravl1", + "type": "tarball", + "url": "https://github.com/osmcode/osmcoastline/archive/56371668ebb6261009f35a7411a8fbcc83aabfe0.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "ozi-map": { "branch": "master", "builtin": false, diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -195,6 +195,7 @@ lib.makeScope newScope ( inherit sources; inherit (perlPackages) GeoOpenstreetmapParser MatchSimple MathPolygon MathPolygonTree TreeR; }; + osmcoastline = callPackage ./tools/geo/osmcoastline { }; phyghtmap = callPackage ./tools/geo/phyghtmap { }; polyvectorization = libsForQt5.callPackage ./tools/graphics/polyvectorization { inherit sources; diff --git a/pkgs/tools/geo/osmcoastline/default.nix b/pkgs/tools/geo/osmcoastline/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, fetchFromGitHub +, cmake +, bzip2 +, expat +, gdal +, geos +, libosmium +, protozero +, sqlite +, zlib +, sources +}: + +stdenv.mkDerivation rec { + pname = "osmcoastline"; + version = stdenv.lib.substring 0 10 sources.osmcoastline.date; + + src = sources.osmcoastline; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + bzip2 + expat + gdal + geos + libosmium + (libosmium.overrideAttrs (old: rec { + version = "2.16.0"; + src = fetchFromGitHub { + owner = "osmcode"; + repo = "libosmium"; + rev = "v${version}"; + sha256 = "1na51g6xfm1bx0d0izbg99cwmqn0grp0g41znn93xnhs202qnb2h"; + }; + })) + protozero + sqlite + zlib + ]; + + meta = with stdenv.lib; { + inherit (sources.osmcoastline) description homepage; + license = licenses.boost; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}