at master 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 sphinxHook, 7 furo, 8 myst-parser, 9 pbr, 10 sphinxcontrib-apidoc, 11 12 # dependencies 13 attrs, 14 binaryornot, 15 boolean-py, 16 click, 17 python-debian, 18 jinja2, 19 license-expression, 20 tomlkit, 21 22 # test dependencies 23 freezegun, 24 pytestCheckHook, 25}: 26 27buildPythonPackage rec { 28 pname = "reuse"; 29 version = "5.1.1"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "fsfe"; 34 repo = "reuse-tool"; 35 tag = "v${version}"; 36 hash = "sha256-xrYr68PpTLglTlLgTHWHJjTd62tzcOvY9h//CxYJOzM="; 37 }; 38 39 outputs = [ 40 "out" 41 "doc" 42 "man" 43 ]; 44 45 build-system = [ 46 poetry-core 47 sphinxHook 48 furo 49 myst-parser 50 pbr 51 sphinxcontrib-apidoc 52 ]; 53 54 dependencies = [ 55 attrs 56 binaryornot 57 boolean-py 58 click 59 python-debian 60 jinja2 61 license-expression 62 tomlkit 63 ]; 64 65 nativeCheckInputs = [ 66 pytestCheckHook 67 freezegun 68 ]; 69 70 disabledTestPaths = [ 71 # pytest wants to execute the actual source files for some reason, which fails with ImportPathMismatchError() 72 "src/reuse" 73 ]; 74 75 sphinxBuilders = [ 76 "html" 77 "man" 78 ]; 79 sphinxRoot = "docs"; 80 81 pythonImportsCheck = [ "reuse" ]; 82 83 meta = with lib; { 84 description = "Tool for compliance with the REUSE Initiative recommendations"; 85 homepage = "https://github.com/fsfe/reuse-tool"; 86 changelog = "https://github.com/fsfe/reuse-tool/blob/v${version}/CHANGELOG.md"; 87 license = with licenses; [ 88 asl20 89 cc-by-sa-40 90 cc0 91 gpl3Plus 92 ]; 93 maintainers = with maintainers; [ 94 FlorianFranzen 95 Luflosi 96 ]; 97 mainProgram = "reuse"; 98 }; 99}