Files
nixpkgs/pkgs/development/python-modules/attrs/default.nix
T
Michael Daniels 075e8c2c4f treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

58 lines
1.2 KiB
Nix

{
lib,
callPackage,
buildPythonPackage,
fetchPypi,
replaceVars,
hatchling,
}:
buildPythonPackage rec {
pname = "attrs";
version = "25.4.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-FtWWm4fwhZ7zOkizXVWsG+bkKuSdXoU7WX23DDXFfhE=";
};
patches = [
(replaceVars ./remove-hatch-plugins.patch {
# hatch-vcs and hatch-fancy-pypi-readme depend on pytest, which depends on attrs
inherit version;
})
];
nativeBuildInputs = [ hatchling ];
outputs = [
"out"
"testout"
];
postInstall = ''
# Install tests as the tests output.
mkdir $testout
cp -R tests $testout
'';
pythonImportsCheck = [ "attr" ];
# pytest depends on attrs, so we can't do this out-of-the-box.
# Instead, we do this as a passthru.tests test.
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = {
description = "Python attributes without boilerplate";
homepage = "https://github.com/python-attrs/attrs";
changelog = "https://github.com/python-attrs/attrs/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mdaniels5757 ];
};
}