1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 setuptools, 7 pythonOlder, 8}: 9 10buildPythonPackage rec { 11 pname = "whatthepatch"; 12 version = "1.0.5"; 13 format = "pyproject"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "cscorley"; 19 repo = pname; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-1+OIs77Vyx56pgf7VSmi4UsPgkv8qZXFm8L2jK2CTMk="; 22 }; 23 24 nativeBuildInputs = [ setuptools ]; 25 26 nativeCheckInputs = [ pytestCheckHook ]; 27 28 pythonImportsCheck = [ "whatthepatch" ]; 29 30 meta = with lib; { 31 description = "Python library for both parsing and applying patch files"; 32 homepage = "https://github.com/cscorley/whatthepatch"; 33 changelog = "https://github.com/cscorley/whatthepatch/blob/${version}/HISTORY.md"; 34 license = licenses.mit; 35 maintainers = with maintainers; [ joelkoen ]; 36 }; 37}