1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 isPyPy, 7 setuptools, 8 docutils, 9 pygments, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 version = "2.0.1"; 15 pname = "smartypants"; 16 pyproject = true; 17 18 disabled = isPyPy; 19 20 src = fetchFromGitHub { 21 owner = "leohemsted"; 22 repo = "smartypants.py"; 23 rev = "v${version}"; 24 sha256 = "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"; 25 }; 26 27 patches = [ 28 (fetchpatch2 { 29 # https://github.com/leohemsted/smartypants.py/pull/21 30 name = "smartypants-3.12-compat.patch"; 31 url = "https://github.com/leohemsted/smartypants.py/commit/ea46bf36343044a7a61ba3acce4a7f188d986ec5.patch"; 32 hash = "sha256-9lsiiZKFFKHLy7j3y9ff4gt01szY+2AHpWPAKQgKwZg="; 33 }) 34 ]; 35 36 nativeBuildInputs = [ setuptools ]; 37 38 nativeCheckInputs = [ 39 docutils 40 pygments 41 pytestCheckHook 42 ]; 43 44 preCheck = '' 45 patchShebangs smartypants 46 ''; 47 48 meta = with lib; { 49 description = "Python with the SmartyPants"; 50 mainProgram = "smartypants"; 51 homepage = "https://github.com/leohemsted/smartypants.py"; 52 license = licenses.bsd3; 53 maintainers = with maintainers; [ dotlambda ]; 54 }; 55}