Skip to content

Commit 174030b

Browse files
authored
python3.pkgs.strip-ansi: init at 0.1.1 (#391941)
2 parents 24e2a45 + a9004e1 commit 174030b

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
lib,
3+
fetchpatch,
4+
buildPythonPackage,
5+
fetchPypi,
6+
poetry-core,
7+
nix-update-script,
8+
}:
9+
10+
buildPythonPackage 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+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16106,6 +16106,8 @@ self: super: with self; {
1610616106

1610716107
stringzilla = callPackage ../development/python-modules/stringzilla { };
1610816108

16109+
strip-ansi = callPackage ../development/python-modules/strip-ansi { };
16110+
1610916111
stripe = callPackage ../development/python-modules/stripe { };
1611016112

1611116113
striprtf = callPackage ../development/python-modules/striprtf { };

0 commit comments

Comments
 (0)