nur-packages

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

commit 299a3e13203a23308f93192dc27b59ccf15c2e6c
parent 1872a01c714f344b348ae21d7c7d31eb71d93e81
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Fri, 21 Mar 2025 02:47:16 +0400

Add srtm2osm

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/osm/srtm2osm/default.nix | 44++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -512,6 +512,7 @@ lib.makeScope newScope ( sdlmap = callPackage ./osm/sdlmap { }; smopy = callPackage ./osm/smopy { }; smrender = callPackage ./osm/smrender { }; + srtm2osm = callPackage ./osm/srtm2osm { }; taginfo-tools = callPackage ./osm/taginfo-tools { }; tilelog = callPackage ./osm/tilelog { }; vectiler = callPackage ./osm/vectiler { }; diff --git a/pkgs/osm/srtm2osm/default.nix b/pkgs/osm/srtm2osm/default.nix @@ -0,0 +1,44 @@ +{ + lib, + stdenv, + fetchfromgh, + unzip, + mono, + makeWrapper, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "srtm2osm"; + version = "1.16.5.0"; + + src = fetchfromgh { + owner = "mibe"; + repo = "Srtm2Osm"; + tag = "v${lib.versions.majorMinor finalAttrs.version}"; + hash = "sha256-wSuz/s7VEgGc3gbXcLwi3TIoW/GwUMGmTMWVWlaS2sI="; + name = "Srtm2Osm-${finalAttrs.version}.zip"; + }; + + nativeBuildInputs = [ + unzip + makeWrapper + ]; + + installPhase = '' + mkdir -p $out/opt/srtm2osm + cp -r . $out/opt/srtm2osm + + makeWrapper ${mono}/bin/mono $out/bin/srtm2osm \ + --add-flags "$out/opt/srtm2osm/Srtm2Osm.exe" + ''; + + meta = { + description = "Srtm2Osm tool uses SRTM digital elevation model to generate elevation contours of a selected terrain"; + homepage = "https://github.com/mibe/Srtm2Osm"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + license = lib.licenses.free; + maintainers = [ lib.maintainers.sikmir ]; + mainProgram = "srtm2osm"; + inherit (mono.meta) platforms; + }; +})