1{ 2 lib, 3 fetchpatch, 4 buildPythonPackage, 5 fetchPypi, 6 poetry-core, 7 nix-update-script, 8}: 9 10buildPythonPackage rec { 11 pname = "strip-ansi"; 12 version = "0.1.1"; 13 pyproject = true; 14 15 src = fetchPypi { 16 inherit pname version; 17 hash = "sha256-XWDyOcyKN/3VK0PD5m6JPUW6BCMRXbWeyg0u74Owdyk="; 18 }; 19 20 patches = [ 21 # Replace `poetry` with `poetry-core`. Unreleased. 22 # See: https://github.com/NixOS/nixpkgs/issues/103325 23 (fetchpatch { 24 url = "https://github.com/gwennlbh/python-strip-ansi/commit/0ea9b418d5b21bd3d3b1b3b91fad7e66f25acb97.diff"; 25 hash = "sha256-Pzlc7fx4kEmM8pezu+8K7z5oV44uq/rzeByqKxHVKx0="; 26 }) 27 ]; 28 29 build-system = [ 30 poetry-core 31 ]; 32 33 pythonImportsCheck = [ 34 "strip_ansi" 35 ]; 36 37 passthru.updateScript = nix-update-script { }; 38 39 meta = { 40 description = "Strip ANSI escape sequences from a string"; 41 homepage = "https://pypi.org/project/strip-ansi"; 42 # License is in the repository but not in PyPI metadata. 43 # See: https://github.com/gwennlbh/python-strip-ansi/blob/master/LICENSE 44 license = lib.licenses.mit; 45 maintainers = [ lib.maintainers._9999years ]; 46 }; 47}