nur-packages

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

commit a2d8fe51e36699266a9272efed116578af5257e5
parent 1a4f2c14207b0410d53809c956efcc89c7e555ea
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sat, 10 Jul 2021 14:45:41 +0300

Add roentgen

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/osm/roentgen/default.nix | 49+++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -266,6 +266,7 @@ lib.makeScope newScope ( osm-area-tools = callPackage ./osm/osm-area-tools { }; osmcoastline = callPackage ./osm/osmcoastline { }; phyghtmap = callPackage ./osm/phyghtmap { }; + roentgen = callPackage ./osm/roentgen { }; sdlmap = callPackage ./osm/sdlmap { }; smrender = callPackage ./osm/smrender { }; taginfo-tools = callPackage ./osm/taginfo-tools { }; diff --git a/pkgs/osm/roentgen/default.nix b/pkgs/osm/roentgen/default.nix @@ -0,0 +1,49 @@ +{ lib, fetchFromGitHub, python3Packages, portolan }: + +python3Packages.buildPythonApplication rec { + pname = "roentgen"; + version = "2021-07-09"; + + src = fetchFromGitHub { + owner = "enzet"; + repo = "Roentgen"; + rev = "3d278a729b6037fe74a634f8329a5b5ff2de6fde"; + hash = "sha256-tb+twq/zOi92sm6tRnrP21TwnntoTnrl02kwAE9CS+w="; + }; + + postPatch = '' + substituteInPlace roentgen.py \ + --replace "scheme/" "$out/share/roentgen/scheme/" \ + --replace "icons/" "$out/share/roentgen/icons/" + substituteInPlace roentgen/mapper.py \ + --replace "scheme/" "$out/share/roentgen/scheme/" \ + --replace "icons/" "$out/share/roentgen/icons/" + substituteInPlace roentgen/tile.py \ + --replace "icons/" "$out/share/roentgen/icons/" + ''; + + dontUseSetuptoolsBuild = true; + dontUseSetuptoolsCheck = true; + + installPhase = let + pythonEnv = python3Packages.python.withPackages (p: with p; [ + colour numpy portolan pyyaml svgwrite urllib3 + ]); + in '' + site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages + mkdir -p $site_packages $out/share/roentgen + cp -r roentgen roentgen.py $site_packages + cp -r icons scheme $out/share/roentgen + + makeWrapper ${pythonEnv.interpreter} $out/bin/roentgen \ + --add-flags "$site_packages/roentgen.py" + ''; + + meta = with lib; { + description = "A simple renderer for OpenStreetMap with custom icons intended to display as many tags as possible"; + inherit (src.meta) homepage; + license = licenses.free; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}