at 23.05-pre 908 B view raw
1{ lib 2, callPackage 3, buildPythonPackage 4, fetchPypi 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "attrs"; 10 version = "22.1.0"; 11 disabled = pythonOlder "3.5"; 12 13 src = fetchPypi { 14 inherit pname version; 15 hash = "sha256-Ka3CZlRH5RkdDnxWj954sh+WctNEKB0MbhqwhUKbIrY="; 16 }; 17 18 outputs = [ 19 "out" 20 "testout" 21 ]; 22 23 postInstall = '' 24 # Install tests as the tests output. 25 mkdir $testout 26 cp -R tests $testout/tests 27 ''; 28 29 pythonImportsCheck = [ 30 "attr" 31 ]; 32 33 # pytest depends on attrs, so we can't do this out-of-the-box. 34 # Instead, we do this as a passthru.tests test. 35 doCheck = false; 36 37 passthru.tests = { 38 pytest = callPackage ./tests.nix { }; 39 }; 40 41 meta = with lib; { 42 description = "Python attributes without boilerplate"; 43 homepage = "https://github.com/python-attrs/attrs"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ ]; 46 }; 47}