nur-packages

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

commit 26820a4bab518e5cf94e485908a73b259a4db930
parent 04efae5a4e9198714b8bebbb70b5909be7cdc6b4
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Tue, 14 Sep 2021 10:20:40 +0300

roentgen → map-machine

Diffstat:
Mpkgs/default.nix | 2+-
Apkgs/osm/map-machine/default.nix | 40++++++++++++++++++++++++++++++++++++++++
Dpkgs/osm/roentgen/default.nix | 62--------------------------------------------------------------
3 files changed, 41 insertions(+), 63 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -284,12 +284,12 @@ lib.makeScope newScope ( ### OSM imposm = callPackage ./osm/imposm { }; + map-machine = callPackage ./osm/map-machine { }; map-stylizer = callPackage ./osm/map-stylizer { }; maperitive-bin = callPackage ./osm/maperitive/bin.nix { }; 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/map-machine/default.nix b/pkgs/osm/map-machine/default.nix @@ -0,0 +1,40 @@ +{ lib, fetchFromGitHub, python3Packages, portolan }: + +python3Packages.buildPythonApplication rec { + pname = "map-machine"; + version = "2021-09-14"; + disabled = python3Packages.pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "enzet"; + repo = pname; + rev = "cc9826ae578b62bbe864c8e24f6931ad28fdac44"; + hash = "sha256-qFM+LNtRL6QCXQ6kiJuSAMfxu5Np8hM3YTKeayoE20g="; + }; + + propagatedBuildInputs = with python3Packages; [ + cairosvg + colour + numpy + pillow + portolan + pycairo + pyyaml + svgwrite + urllib3 + ]; + + checkInputs = with python3Packages; [ pytestCheckHook ]; + preCheck = "export PATH=$PATH:$out/bin"; + disabledTests = [ + "test_tile" + ]; + + meta = with lib; { + description = "A simple renderer for OpenStreetMap with custom icons"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/osm/roentgen/default.nix b/pkgs/osm/roentgen/default.nix @@ -1,62 +0,0 @@ -{ lib, fetchFromGitHub, python3Packages, portolan, inkscape }: - -python3Packages.buildPythonApplication rec { - pname = "roentgen"; - version = "2021-08-19"; - disabled = python3Packages.pythonOlder "3.9"; - - src = fetchFromGitHub { - owner = "enzet"; - repo = "Roentgen"; - rev = "62d1a5e6dc4dceb4599209fe504e0c0240f13171"; - hash = "sha256-AsbRYeJxGxwI55YcrBRPpDVD+rYwNXjocRmkO4ruz/U="; - }; - - 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/" - substituteInPlace roentgen/workspace.py \ - --replace "scheme" "$out/share/roentgen/scheme" \ - --replace "icons/" "$out/share/roentgen/icons/" - ''; - - dontUseSetuptoolsBuild = true; - dontUseSetuptoolsCheck = true; - - installPhase = - let - pythonEnv = python3Packages.python.withPackages (p: with p; [ - colour - numpy - portolan - pycairo - 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" \ - --set INKSCAPE_BIN ${inkscape}/bin/inkscape - ''; - - 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.mit; - maintainers = [ maintainers.sikmir ]; - platforms = platforms.unix; - }; -}