nur-packages

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

commit ba95c2955ceb02fd65aeff3ccd45d182cacdf8b8
parent 753bb45ee0ceea5d3a3a518c78cacbd046519b80
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Tue, 19 Sep 2023 22:58:03 +0400

Add gcgn-converter

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

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -439,6 +439,7 @@ lib.makeScope newScope ( ### OSM cykhash = callPackage ./osm/cykhash { }; + gcgn-converter = callPackage ./osm/gcgn-converter { }; imposm = callPackage ./osm/imposm { }; map-machine = callPackage ./osm/map-machine { }; map-stylizer = callPackage ./osm/map-stylizer { }; diff --git a/pkgs/osm/gcgn-converter/default.nix b/pkgs/osm/gcgn-converter/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonApplication rec { + pname = "gcgn-converter"; + version = "08.07.2023"; + format = "other"; + + src = fetchFromGitHub { + owner = "Miroff"; + repo = "gcgn-converter"; + rev = version; + hash = "sha256-1ipBRQNMGb0wBAHxlJWoQEcaegR3wrlAw9YXUF4fkH8="; + }; + + dontUseSetuptoolsBuild = true; + dontUseSetuptoolsCheck = true; + + installPhase = + let + pythonEnv = python3Packages.python.withPackages (p: with p; [ + camelot pypdf geojson beautifulsoup4 tqdm + ]); + in + '' + site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages + mkdir -p $site_packages + cp *.py $site_packages + + makeWrapper ${pythonEnv.interpreter} $out/bin/gcgn_convert \ + --add-flags "$site_packages/gcgn_convert.py" + ''; + + meta = with lib; { + description = "Ковертер ГКГН из PDF в GeoJSON"; + inherit (src.meta) homepage; + license = licenses.free; + maintainers = with maintainers; [ sikmir ]; + }; +}