1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 isPyPy, 7 setuptools, 8 docutils, 9 pygments, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "smartypants"; 15 version = "2.0.1"; 16 pyproject = true; 17 18 disabled = isPyPy; 19 20 src = fetchFromGitHub { 21 owner = "leohemsted"; 22 repo = "smartypants.py"; 23 tag = "v${version}"; 24 hash = "sha256-V1rV1B8jVADkS0NhnDkoVz8xxkqrsIHb1mP9m5Z94QI="; 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 build-system = [ 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 homepage = "https://github.com/leohemsted/smartypants.py"; 51 changelog = "https://github.com/leohemsted/smartypants.py/blob/v${version}/CHANGES.rst"; 52 license = licenses.bsd3; 53 maintainers = with maintainers; [ dotlambda ]; 54 mainProgram = "smartypants"; 55 }; 56}