1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 pytestCheckHook, 7 pythonOlder, 8 setuptools, 9 wheel, 10}: 11 12buildPythonPackage rec { 13 pname = "wheel-filename"; 14 version = "1.4.1"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.6"; 18 19 src = fetchFromGitHub { 20 owner = "jwodder"; 21 repo = pname; 22 rev = "v${version}"; 23 hash = "sha256-M3XGHG733X5qKuMS6mvFSFHYOwWPaBMXw+w0eYo6ByE="; 24 }; 25 26 patches = [ 27 (fetchpatch { 28 name = "remove-wheel-dependency-constraint.patch"; 29 url = "https://github.com/jwodder/wheel-filename/commit/11cfa57c8a32fa2a52fb5fe537859997bb642e75.patch"; 30 hash = "sha256-ssePCVlJuHPJpPyFET3FnnWRlslLnZbnfn42g52yVN4="; 31 }) 32 ]; 33 34 nativeBuildInputs = [ 35 setuptools 36 wheel 37 ]; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 postPatch = '' 42 substituteInPlace tox.ini \ 43 --replace " --cov=wheel_filename --no-cov-on-fail" "" 44 ''; 45 46 pythonImportsCheck = [ "wheel_filename" ]; 47 48 meta = with lib; { 49 description = "Parse wheel filenames"; 50 mainProgram = "wheel-filename"; 51 homepage = "https://github.com/jwodder/wheel-filename"; 52 license = with licenses; [ mit ]; 53 maintainers = with lib.maintainers; [ ayazhafiz ]; 54 }; 55}