nur-packages

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

default.nix (1822B)


      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/track.py \
     33       --replace-fail "from stravalib.model import Activity" "from stravalib.model import DetailedActivity"
     34     substituteInPlace gpxtrackposter/cli.py \
     35       --subst-var out
     36   '';
     37 
     38   dependencies = with python3Packages; [
     39     appdirs
     40     colour
     41     geopy
     42     gpxpy
     43     pint
     44     pytz
     45     s2sphere
     46     svgwrite
     47     stravalib
     48     polyline
     49     timezonefinder
     50     setuptools
     51   ];
     52 
     53   nativeCheckInputs = with python3Packages; [
     54     pytestCheckHook
     55     (pytest-mock.overrideAttrs (old: rec {
     56       pname = "pytest-mock";
     57       version = "3.3.1";
     58       src = fetchPypi {
     59         inherit pname version;
     60         hash = "sha256-pNbTcynkqJPnfZ/6ieg43StF1dwJmYTPA8cDrIQRu4I=";
     61       };
     62     }))
     63   ];
     64 
     65   doCheck = false;
     66 
     67   postInstall = "rm -fr $out/requirements*.txt";
     68 
     69   meta = {
     70     description = "Create a visually appealing poster from your GPX tracks";
     71     homepage = "https://github.com/flopp/GpxTrackPoster";
     72     license = lib.licenses.mit;
     73     maintainers = [ lib.maintainers.sikmir ];
     74   };
     75 }