1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 pytestCheckHook, 7 coverage, 8 python, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "miss-hit-core"; 14 version = "0.9.44"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "florianschanda"; 21 repo = "miss_hit"; 22 tag = version; 23 hash = "sha256-dJZIleDWmdarhmxoKvQxWvI/Tmx9pSCNlgFXj5NFIUc="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 configurePhase = '' 29 runHook preConfigure 30 31 cp setup_gpl.py setup.py 32 mkdir -p miss_hit_core/resources/assets 33 cp docs/style.css miss_hit_core/resources 34 cp docs/assets/* miss_hit_core/resources/assets 35 36 runHook postConfigure 37 ''; 38 39 nativeCheckInputs = [ 40 coverage 41 ]; 42 43 checkPhase = '' 44 runHook preCheck 45 46 cd tests 47 ${python.interpreter} ./run.py --suite=style 48 ${python.interpreter} ./run.py --suite=metrics 49 50 runHook postCheck 51 ''; 52 53 pythonImportsCheck = [ 54 "miss_hit_core" 55 ]; 56 57 meta = { 58 description = "Code formatting and code metrics for programs written in the MATLAB/Simulink and Octave languages"; 59 homepage = "https://misshit.org/"; 60 changelog = "https://github.com/florianschanda/miss_hit/releases/tag/${version}"; 61 license = lib.licenses.gpl3Plus; 62 maintainers = with lib.maintainers; [ 63 jacobkoziej 64 ]; 65 }; 66}