2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, binaryornot
|
|
|
|
, boolean-py
|
|
|
|
, debian
|
|
|
|
, jinja2
|
|
|
|
, license-expression
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "reuse";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "3.0.1";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fsfe";
|
|
|
|
repo = "reuse-tool";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-hDvOT9BP/E95FTa8rvtdxQoEDYgfMAkCSbX5KKV3qbQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
propagatedBuildInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
binaryornot
|
|
|
|
boolean-py
|
|
|
|
debian
|
|
|
|
jinja2
|
|
|
|
license-expression
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# pytest wants to execute the actual source files for some reason, which fails with ImportPathMismatchError()
|
|
|
|
"src/reuse"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonImportsCheck = [ "reuse" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool for compliance with the REUSE Initiative recommendations";
|
|
|
|
homepage = "https://github.com/fsfe/reuse-tool";
|
|
|
|
license = with licenses; [ asl20 cc-by-sa-40 cc0 gpl3Plus ];
|
2022-12-17 10:02:37 +00:00
|
|
|
maintainers = with maintainers; [ FlorianFranzen Luflosi ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "reuse";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|