1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, flaky 5, hatch-vcs 6, hatchling 7, httpx 8, importlib-metadata 9, pytestCheckHook 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "pylast"; 15 version = "5.1.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "pylast"; 22 repo = pname; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-LRZYLo9h7Z8WXemLgKR5qzAmtL4x/AQQJpta3e0WHcc="; 25 }; 26 27 SETUPTOOLS_SCM_PRETEND_VERSION = version; 28 29 nativeBuildInputs = [ 30 hatch-vcs 31 hatchling 32 ]; 33 34 propagatedBuildInputs = [ 35 httpx 36 ] ++ lib.optionals (pythonOlder "3.8") [ 37 importlib-metadata 38 ]; 39 40 checkInputs = [ 41 pytestCheckHook 42 flaky 43 ]; 44 45 pythonImportsCheck = [ 46 "pylast" 47 ]; 48 49 meta = with lib; { 50 description = "Python interface to last.fm (and compatibles)"; 51 homepage = "https://github.com/pylast/pylast"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ fab rvolosatovs ]; 54 }; 55}