nur-packages

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

default.nix (1775B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   fetchpatch,
      5   python3Packages,
      6   s2sphere,
      7 }:
      8 
      9 python3Packages.buildPythonApplication {
     10   pname = "gpxtrackposter";
     11   version = "0-unstable-2023-02-19";
     12 
     13   src = fetchFromGitHub {
     14     owner = "flopp";
     15     repo = "GpxTrackPoster";
     16     rev = "0b86e7223eaeea3e168f5b68ee7b8fe4ca8532b5";
     17     hash = "sha256-pSMfHNpGt68Elgi4NGrBlnZxpsuS7WhqM6kBDcihLu8=";
     18   };
     19 
     20   patches = [
     21     # Fix TimezoneAdjuster
     22     (fetchpatch {
     23       url = "https://github.com/flopp/GpxTrackPoster/commit/4ccfbe89ae49cbac18b773d2cada2c75aead67b1.patch";
     24       hash = "sha256-1nnZZO4KipT/mDwBLZgrbpE1HbwGOGbYM9D5cnmp8zY=";
     25     })
     26     ./fix-localedir.patch
     27   ];
     28 
     29   postPatch = ''
     30     substituteInPlace gpxtrackposter/poster.py \
     31       --replace-fail "self.translate(\"ATHLETE\")" "\"\""
     32     substituteInPlace gpxtrackposter/cli.py \
     33       --subst-var out
     34     sed -i 's/~=.*//' requirements.txt
     35   '';
     36 
     37   dependencies = with python3Packages; [
     38     appdirs
     39     colour
     40     geopy
     41     gpxpy
     42     pint
     43     pytz
     44     s2sphere
     45     svgwrite
     46     stravalib
     47     polyline
     48     timezonefinder
     49     setuptools
     50   ];
     51 
     52   nativeCheckInputs = with python3Packages; [
     53     pytestCheckHook
     54     (pytest-mock.overrideAttrs (old: rec {
     55       pname = "pytest-mock";
     56       version = "3.3.1";
     57       src = fetchPypi {
     58         inherit pname version;
     59         hash = "sha256-pNbTcynkqJPnfZ/6ieg43StF1dwJmYTPA8cDrIQRu4I=";
     60       };
     61     }))
     62   ];
     63 
     64   doCheck = false;
     65 
     66   postInstall = "rm -fr $out/requirements*.txt";
     67 
     68   meta = {
     69     description = "Create a visually appealing poster from your GPX tracks";
     70     homepage = "https://github.com/flopp/GpxTrackPoster";
     71     license = lib.licenses.mit;
     72     maintainers = [ lib.maintainers.sikmir ];
     73     broken = true; # https://github.com/stravalib/stravalib/pull/459
     74   };
     75 }