Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.3 kB · 59 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960{ lib, callPackage, buildPythonPackage, fetchPypi, pythonOlder, replaceVars, hatchling,}:
buildPythonPackage rec { pname = "attrs"; version = "25.3.0"; disabled = pythonOlder "3.7"; format = "pyproject";
src = fetchPypi { inherit pname version; hash = "sha256-ddfO/H+1dnR7LIG0RC1NShzgkAlzUnwBHRAw/Tv0rxs="; };
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 conftest.py 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 = with lib; { description = "Python attributes without boilerplate"; homepage = "https://github.com/python-attrs/attrs"; changelog = "https://github.com/python-attrs/attrs/releases/tag/${version}"; license = licenses.mit; maintainers = [ ]; };}