Unverified Commit a9004e14 authored by Rebecca Turner's avatar Rebecca Turner
Browse files

python3.pkgs.strip-ansi: init at 0.1.1

parent 8dbc39f6
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
{
  lib,
  fetchpatch,
  buildPythonPackage,
  fetchPypi,
  poetry-core,
  nix-update-script,
}:

buildPythonPackage rec {
  pname = "strip-ansi";
  version = "0.1.1";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-XWDyOcyKN/3VK0PD5m6JPUW6BCMRXbWeyg0u74Owdyk=";
  };

  patches = [
    # Replace `poetry` with `poetry-core`. Unreleased.
    # See: https://github.com/NixOS/nixpkgs/issues/103325
    (fetchpatch {
      url = "https://github.com/gwennlbh/python-strip-ansi/commit/0ea9b418d5b21bd3d3b1b3b91fad7e66f25acb97.diff";
      hash = "sha256-Pzlc7fx4kEmM8pezu+8K7z5oV44uq/rzeByqKxHVKx0=";
    })
  ];

  build-system = [
    poetry-core
  ];

  pythonImportsCheck = [
    "strip_ansi"
  ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Strip ANSI escape sequences from a string";
    homepage = "https://pypi.org/project/strip-ansi";
    # License is in the repository but not in PyPI metadata.
    # See: https://github.com/gwennlbh/python-strip-ansi/blob/master/LICENSE
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers._9999years ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -16100,6 +16100,8 @@ self: super: with self; {
  stringzilla = callPackage ../development/python-modules/stringzilla { };
  strip-ansi = callPackage ../development/python-modules/strip-ansi { };
  stripe = callPackage ../development/python-modules/stripe { };
  striprtf = callPackage ../development/python-modules/striprtf { };