nur-packages

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

default.nix (1134B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   python3Packages,
      6 }:
      7 
      8 python3Packages.buildPythonApplication rec {
      9   pname = "gcgn-converter";
     10   version = "08.07.2023";
     11   format = "other";
     12 
     13   src = fetchFromGitHub {
     14     owner = "Miroff";
     15     repo = "gcgn-converter";
     16     rev = version;
     17     hash = "sha256-1ipBRQNMGb0wBAHxlJWoQEcaegR3wrlAw9YXUF4fkH8=";
     18   };
     19 
     20   dontUseSetuptoolsBuild = true;
     21   dontUseSetuptoolsCheck = true;
     22 
     23   installPhase =
     24     let
     25       pythonEnv = python3Packages.python.withPackages (
     26         p: with p; [
     27           camelot
     28           pypdf
     29           geojson
     30           beautifulsoup4
     31           tqdm
     32         ]
     33       );
     34     in
     35     ''
     36       site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages
     37       mkdir -p $site_packages
     38       cp *.py $site_packages
     39 
     40       makeWrapper ${pythonEnv.interpreter} $out/bin/gcgn_convert \
     41         --add-flags "$site_packages/gcgn_convert.py"
     42     '';
     43 
     44   meta = {
     45     description = "Ковертер ГКГН из PDF в GeoJSON";
     46     homepage = "https://github.com/Miroff/gcgn-converter";
     47     license = lib.licenses.free;
     48     maintainers = [ lib.maintainers.sikmir ];
     49   };
     50 }