567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
46 lines
957 B
Nix
46 lines
957 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
python,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "findimports";
|
|
version = "2.7.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mgedmin";
|
|
repo = "findimports";
|
|
tag = version;
|
|
hash = "sha256-ztbf9F1tz5EhqSkE8W6i7ihJYJTymKQdXI+K/G7DbHM=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
pythonImportsCheck = [ "findimports" ];
|
|
|
|
checkPhase = ''
|
|
# Tests fails
|
|
rm tests/cmdline.txt
|
|
|
|
runHook preCheck
|
|
${python.interpreter} testsuite.py
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = {
|
|
description = "Module for the analysis of Python import statements";
|
|
homepage = "https://github.com/mgedmin/findimports";
|
|
changelog = "https://github.com/mgedmin/findimports/blob/${src.tag}/CHANGES.rst";
|
|
license = with lib.licenses; [
|
|
gpl2Only # or
|
|
gpl3Only
|
|
];
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "findimports";
|
|
};
|
|
}
|