about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ebcdic/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ebcdic/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/ebcdic/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ebcdic/default.nix b/nixpkgs/pkgs/development/python-modules/ebcdic/default.nix
new file mode 100644
index 000000000000..430ebfe24c58
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/ebcdic/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+, pythonOlder
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "ebcdic";
+  version = "1.1.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "roskakori";
+    repo = "CodecMapper";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-gRyZychcF3wYocgVbdF255cSuZh/cl8X0WH/Iplkmxc=";
+  };
+
+  sourceRoot = "${src.name}/${pname}";
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # https://github.com/roskakori/CodecMapper/issues/18
+    "test_can_lookup_ebcdic_codec"
+    "test_can_recode_euro_sign"
+    "test_has_codecs"
+    "test_has_ignored_codec_names"
+  ];
+
+  pythonImportsCheck = [
+    "ebcdic"
+  ];
+
+  meta = with lib; {
+    description = "Additional EBCDIC codecs";
+    homepage = "https://github.com/roskakori/CodecMapper/tree/master/ebcdic";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ fab ];
+  };
+}