depot/third_party/nixpkgs/pkgs/development/python-modules/attr/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

35 lines
750 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
python,
}:
buildPythonPackage rec {
pname = "attr";
version = "0.3.2";
pyproject = true;
src = fetchFromGitHub {
owner = "denis-ryzhkov";
repo = "attr";
rev = version;
hash = "sha256-1gOAONDuZb7xEPFZJc00BRtFF06uX65S8b3RRRNGeSo=";
};
build-system = [ setuptools ];
checkPhase = ''
runHook preCheck
${python.interpreter} -c "import dry_attr; dry_attr.test()"
runHook postCheck
'';
meta = {
description = "Simple decorator to set attributes of target function or class in a DRY way.";
homepage = "https://github.com/denis-ryzhkov/attr";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}