about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ansi2image/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/ansi2image/default.nix')
-rw-r--r--pkgs/development/python-modules/ansi2image/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/ansi2image/default.nix b/pkgs/development/python-modules/ansi2image/default.nix
new file mode 100644
index 0000000000000..1d66f846bacd9
--- /dev/null
+++ b/pkgs/development/python-modules/ansi2image/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, colorama
+, fetchFromGitHub
+, pillow
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "ansi2image";
+  version = "0.1.4";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "helviojunior";
+    repo = "ansi2image";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-1sPEEWcOzesLQXSeMsUra8ZRSMAKzH6iisOgdhpxhKM=";
+  };
+
+  propagatedBuildInputs = [
+    colorama
+    pillow
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "ansi2image"
+  ];
+
+  pytestFlagsArray = [
+    "tests/tests.py"
+  ];
+
+  meta = with lib; {
+    description = "Module to convert ANSI text to an image";
+    homepage = "https://github.com/helviojunior/ansi2image";
+    changelog = "https://github.com/helviojunior/ansi2image/blob/${version}/CHANGELOG";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ fab ];
+  };
+}