nur-packages

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

default.nix (1213B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5 }:
      6 
      7 python3Packages.buildPythonApplication {
      8   pname = "mbtiles2osmand";
      9   version = "0-unstable-2021-01-01";
     10   format = "other";
     11 
     12   src = fetchFromGitHub {
     13     owner = "tarwirdur";
     14     repo = "mbtiles2osmand";
     15     rev = "5084a6ff9c60794044a751cc62ef84b6e37a342e";
     16     hash = "sha256-vghESjT6Pklq7IjxTEIHfTxX2B3eCgUl9CP+eJntByA=";
     17   };
     18 
     19   dontUseSetuptoolsBuild = true;
     20   dontUseSetuptoolsCheck = true;
     21 
     22   installPhase =
     23     let
     24       pythonEnv = python3Packages.python.withPackages (p: with p; [ pillow ]);
     25     in
     26     ''
     27       site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages
     28       mkdir -p $site_packages
     29       cp *.py $site_packages
     30 
     31       makeWrapper ${pythonEnv.interpreter} $out/bin/mbtiles2osmand \
     32         --add-flags "$site_packages/mbtiles2osmand.py"
     33       makeWrapper ${pythonEnv.interpreter} $out/bin/unite_osmand \
     34         --add-flags "$site_packages/unite_osmand.py"
     35     '';
     36 
     37   meta = {
     38     description = "Converts mbtiles format to sqlitedb format suitable for OsmAnd and RMaps";
     39     homepage = "https://github.com/tarwirdur/mbtiles2osmand";
     40     license = lib.licenses.mit;
     41     maintainers = [ lib.maintainers.sikmir ];
     42   };
     43 }