Files
nixpkgs/pkgs/development/python-modules/hacking/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01:00

56 lines
880 B
Nix

{
lib,
buildPythonPackage,
ddt,
fetchPypi,
flake8,
pbr,
pythonOlder,
setuptools,
stestr,
testscenarios,
}:
buildPythonPackage rec {
pname = "hacking";
version = "8.0.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-N89wYj7PMkdMTNYWSCeuff9HU62n+e/HBeiIOhAPi7I=";
};
postPatch = ''
sed -i 's/flake8.*/flake8/' requirements.txt
'';
build-system = [
pbr
setuptools
];
dependencies = [ flake8 ];
nativeCheckInputs = [
ddt
stestr
testscenarios
];
checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';
pythonImportsCheck = [ "hacking" ];
meta = {
description = "OpenStack Hacking Guideline Enforcement";
homepage = "https://github.com/openstack/hacking";
license = lib.licenses.asl20;
teams = [ lib.teams.openstack ];
};
}