nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 45 lines 1.1 kB view raw
1{ lib, buildPythonPackage, fetchPypi 2, fetchpatch 3, packaging 4, python 5, pythonAtLeast 6, pythonOlder 7, unittest2 8}: 9 10buildPythonPackage rec { 11 pname = "deprecation"; 12 version = "2.1.0"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"; 17 }; 18 19 patches = lib.optionals (pythonAtLeast "3.10") [ 20 # fixes for python 3.10 test suite 21 (fetchpatch { 22 url = "https://github.com/briancurtin/deprecation/pull/57/commits/e13e23068cb8d653a02a434a159e8b0b7226ffd6.patch"; 23 sha256 = "sha256-/5zr2V1s5ULUZnbLXsgyHxZH4m7/a27QYuqQt2Savc8="; 24 includes = [ "tests/test_deprecation.py" ]; 25 }) 26 ]; 27 28 propagatedBuildInputs = [ packaging ]; 29 30 # avoiding mass rebuilds for python3.9, but no longer 31 # needed with patch 32 checkInputs = lib.optional (pythonOlder "3.10") [ 33 unittest2 34 ]; 35 36 checkPhase = '' 37 ${python.interpreter} -m unittest discover 38 ''; 39 40 meta = with lib; { 41 description = "A library to handle automated deprecations"; 42 homepage = "https://deprecation.readthedocs.io/"; 43 license = licenses.asl20; 44 }; 45}