nur-packages

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

commit c58bf218ec0f4a6f8ad78c46dbf6fd44b6e77ee6
parent 3cc82920e01cfcab3b2a68049e162ee28a1cb086
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sat,  2 Oct 2021 21:40:50 +0300

Add osmwalkthrough

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/osm/osmwalkthrough/default.nix | 40++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -297,6 +297,7 @@ lib.makeScope newScope ( osm-area-tools = callPackage ./osm/osm-area-tools { }; osmcoastline = callPackage ./osm/osmcoastline { }; overpass-api = callPackage ./osm/overpass-api { }; + osmwalkthrough = callPackage ./osm/osmwalkthrough { }; phyghtmap = callPackage ./osm/phyghtmap { }; sdlmap = callPackage ./osm/sdlmap { }; smopy = callPackage ./osm/smopy { }; diff --git a/pkgs/osm/osmwalkthrough/default.nix b/pkgs/osm/osmwalkthrough/default.nix @@ -0,0 +1,40 @@ +{ lib, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonApplication rec { + pname = "osmwalkthrough"; + version = "2021-09-24"; + + src = fetchFromGitHub { + owner = "leotrubach"; + repo = pname; + rev = "e96bbfd1e0465d7447c51056f5845da251b50cff"; + hash = "sha256-M727uDMHBkBie2g6Cl5QPGwQtcAnC3goJ9qM8VVEoUU="; + }; + + dontUseSetuptoolsBuild = true; + doCheck = false; + + installPhase = + let + pythonEnv = python3Packages.python.withPackages (p: with p; [ + geographiclib + geopy + networkx + ]); + in + '' + site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages + mkdir -p $site_packages + cp *.py $site_packages + + makeWrapper ${pythonEnv.interpreter} $out/bin/solver \ + --add-flags "$site_packages/solver.py" + ''; + + meta = with lib; { + description = "Draw ways you want to walk through"; + inherit (src.meta) homepage; + license = licenses.gpl3; + maintainers = [ maintainers.sikmir ]; + }; +}