at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 asserts, 11 mypy, 12}: 13 14buildPythonPackage rec { 15 pname = "htmlgen"; 16 version = "2.0.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "srittau"; 21 repo = "python-htmlgen"; 22 tag = "v${version}"; 23 hash = "sha256-RmJKaaTB+xvsJ+9jM21ZUNVTlr7ebPW785A8OXrpDoY="; 24 }; 25 26 build-system = [ 27 setuptools 28 ]; 29 30 dependencies = [ 31 mypy 32 ]; 33 34 nativeCheckInputs = [ 35 asserts 36 ]; 37 # From some reason, using unittestCheckHook doesn't work, and the list of 38 # test files have to be used explicitly, and also without the `discover` 39 # argument. 40 checkPhase = '' 41 runHook preCheck 42 43 python -m unittest test_htmlgen/*.py 44 45 runHook postCheck 46 ''; 47 48 pythonImportsCheck = [ 49 "htmlgen" 50 ]; 51 52 meta = { 53 description = "Python HTML 5 Generator"; 54 homepage = "https://github.com/srittau/python-htmlgen"; 55 changelog = "https://github.com/srittau/python-htmlgen/blob/v${version}/NEWS.md"; 56 license = lib.licenses.mit; 57 maintainers = with lib.maintainers; [ doronbehar ]; 58 }; 59}