nur-packages

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

default.nix (987B)


      1 {
      2   lib,
      3   python3Packages,
      4   fetchFromGitHub,
      5   fetchurl,
      6 }:
      7 let
      8   testdata = import ./testdata.nix { inherit fetchurl; };
      9 in
     10 python3Packages.buildPythonApplication rec {
     11   pname = "gpxelevations";
     12   version = "0.3.7";
     13 
     14   src = fetchFromGitHub {
     15     owner = "tkrajina";
     16     repo = "srtm.py";
     17     rev = "v${version}";
     18     hash = "sha256-/AGvFE74sJTnn70VklQp0MG+7dsooavAdSTyV2oJM+I=";
     19   };
     20 
     21   dependencies = with python3Packages; [
     22     requests
     23     gpxpy
     24   ];
     25 
     26   dontUseSetuptoolsCheck = true;
     27 
     28   checkPhase = ''
     29     mkdir -p tmp_home/.cache/srtm
     30     ${lib.concatMapStringsSep "\n" (hgt: ''
     31       cp ${hgt} tmp_home/.cache/srtm/${hgt.name}
     32     '') testdata}
     33 
     34     HOME=tmp_home ${python3Packages.python.interpreter} -m unittest test
     35   '';
     36 
     37   meta = {
     38     description = "Geo elevation data parser for \"The Shuttle Radar Topography Mission\" data";
     39     homepage = "https://github.com/tkrajina/srtm.py";
     40     license = lib.licenses.asl20;
     41     maintainers = [ lib.maintainers.sikmir ];
     42   };
     43 }