1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 # build inputs 7 setuptools, 8 setuptools-scm, 9 typing-extensions, 10}: 11 12buildPythonPackage rec { 13 pname = "widlparser"; 14 version = "1.4.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "plinss"; 21 repo = "widlparser"; 22 rev = "v${version}"; 23 hash = "sha256-vYDldZH49GfNRjKh3x0DX05jYFOLQtA//7bw+B16O1M="; 24 }; 25 26 build-system = [ 27 setuptools 28 setuptools-scm 29 ]; 30 31 dependencies = [ typing-extensions ]; 32 33 pythonImportsCheck = [ "widlparser" ]; 34 35 # https://github.com/plinss/widlparser/blob/v1.4.0/.github/workflows/test.yml 36 checkPhase = '' 37 runHook preCheck 38 39 python test.py > test-actual.txt 40 diff -u test-expected.txt test-actual.txt 41 42 runHook postCheck 43 ''; 44 45 meta = with lib; { 46 description = "Stand-alone WebIDL Parser in Python"; 47 homepage = "https://github.com/plinss/widlparser"; 48 license = licenses.mit; 49 maintainers = [ ]; 50 }; 51}