diff --git a/pkgs/development/python-modules/torf/default.nix b/pkgs/development/python-modules/torf/default.nix new file mode 100644 index 000000000000..75184fcb02dc --- /dev/null +++ b/pkgs/development/python-modules/torf/default.nix @@ -0,0 +1,57 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + flatbencode, + pytest-cov-stub, + pytest-httpserver, + pytest-mock, + pytest-xdist, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "torf"; + version = "4.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "rndusr"; + repo = "torf"; + tag = "v${version}"; + hash = "sha256-vJapB4Tbn3tLLUIH9LemU9kTqG7TsByiotkWM52lsno="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + flatbencode + ]; + + nativeCheckInputs = [ + pytest-cov-stub + pytest-httpserver + pytest-mock + pytest-xdist + pytestCheckHook + ]; + + disabledTests = [ + # Those tests fail DNS resolution in the sandbox + "test_getting_info__xs_fails__as_fails" + "test_getting_info__xs_returns_invalid_bytes" + "test_getting_info__as_returns_invalid_bytes" + ]; + + pythonImportsCheck = [ "torf" ]; + + meta = with lib; { + description = "create, parse and edit torrent files and magnet links"; + homepage = "https://github.com/rndusr/torf"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ambroisie ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e4c7027d52a4..c1b3e50d9c39 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17581,6 +17581,8 @@ self: super: with self; { torchvision-bin = callPackage ../development/python-modules/torchvision/bin.nix { }; + torf = callPackage ../development/python-modules/torf { }; + tornado = callPackage ../development/python-modules/tornado { }; torpy = callPackage ../development/python-modules/torpy { };