summary refs log tree commit diff
path: root/pkgs/development/python-modules/torrent-parser/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/torrent-parser/default.nix')
-rw-r--r--pkgs/development/python-modules/torrent-parser/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/torrent-parser/default.nix b/pkgs/development/python-modules/torrent-parser/default.nix
new file mode 100644
index 00000000000..2e946229747
--- /dev/null
+++ b/pkgs/development/python-modules/torrent-parser/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "torrent-parser";
+  version = "0.4.1";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner  = "7sDream";
+    repo   = "torrent_parser";
+    rev    = "v${version}";
+    hash = "sha256-zM738r3o9dGZYoWLN7fM4E06m6YPcAODEkgDS6wU/Sc=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "torrent_parser"
+  ];
+
+  meta = {
+    description = "A .torrent file parser and creator for both Python 2 and 3";
+    homepage    = "https://github.com/7sDream/torrent_parser";
+    changelog = "https://github.com/7sDream/torrent_parser/blob/${src.rev}/CHANGELOG.md";
+    license     = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ ];
+  };
+}