1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, pytestCheckHook 6, pythonOlder 7, setuptools 8, wheel 9}: 10 11buildPythonPackage rec { 12 pname = "polyline"; 13 version = "2.0.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "frederickjansen"; 20 repo = pname; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-e9ZDqcS3MaMlXi2a2JHI6NtRPqIV7rjsucGXEH6V8LA="; 23 }; 24 25 patches = [ 26 # https://github.com/frederickjansen/polyline/pull/15 27 (fetchpatch { 28 name = "relax-build-dependencies.patch"; 29 url = "https://github.com/frederickjansen/polyline/commit/cb9fc80606c33dbbcaa0d94de25ae952358443b6.patch"; 30 hash = "sha256-epg2pZAG+9QuICa1ms+/EO2DDmYEz+KEtxxnvG7rsWY="; 31 }) 32 ]; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace " --cov=polyline --cov-report term-missing" "" 37 ''; 38 39 nativeBuildInputs = [ 40 setuptools 41 wheel 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ]; 47 48 pythonImportsCheck = [ 49 "polyline" 50 ]; 51 52 meta = with lib; { 53 description = "Python implementation of Google's Encoded Polyline Algorithm Format"; 54 longDescription = '' 55 polyline is a Python implementation of Google's Encoded Polyline Algorithm Format. It is 56 essentially a port of https://github.com/mapbox/polyline. 57 ''; 58 homepage = "https://github.com/frederickjansen/polyline"; 59 changelog = "https://github.com/frederickjansen/polyline/releases/tag/${version}"; 60 license = licenses.mit; 61 maintainers = with maintainers; [ ersin ]; 62 }; 63}