summary refs log tree commit diff
path: root/pkgs/development/python-modules/identify/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/identify/default.nix')
-rw-r--r--pkgs/development/python-modules/identify/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/identify/default.nix b/pkgs/development/python-modules/identify/default.nix
new file mode 100644
index 00000000000..18a12fe9e19
--- /dev/null
+++ b/pkgs/development/python-modules/identify/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, buildPythonPackage
+, editdistance-s
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+, ukkonen
+}:
+
+buildPythonPackage rec {
+  pname = "identify";
+  version = "2.4.12";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "pre-commit";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-kXhUlt+lcqK3ohOA8eziFcrm4U/FAYWpie4rH5xRejI=";
+  };
+
+  checkInputs = [
+    editdistance-s
+    pytestCheckHook
+    ukkonen
+  ];
+
+  pythonImportsCheck = [
+    "identify"
+  ];
+
+  meta = with lib; {
+    description = "File identification library for Python";
+    homepage = "https://github.com/chriskuehl/identify";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}