summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2023-06-14 16:03:45 -0700
committerTheodore Ni <3806110+tjni@users.noreply.github.com>2023-06-14 16:03:45 -0700
commitce51b2bb02068ac6227e2512feea61ec00129c8e (patch)
treef30e8a09ad81f7019a7c6bd5fe73914b4d5091b0
parentad394839cae4c574fed34b058ff38b2d04f906e4 (diff)
downloadnixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.tar
nixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.tar.gz
nixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.tar.bz2
nixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.tar.lz
nixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.tar.xz
nixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.tar.zst
nixpkgs-ce51b2bb02068ac6227e2512feea61ec00129c8e.zip
python310Packages.tiny-proxy: init at 0.2.0
-rw-r--r--pkgs/development/python-modules/tiny-proxy/default.nix45
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/tiny-proxy/default.nix b/pkgs/development/python-modules/tiny-proxy/default.nix
new file mode 100644
index 00000000000..cbb015909ec
--- /dev/null
+++ b/pkgs/development/python-modules/tiny-proxy/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, anyio
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, setuptools
+}:
+
+buildPythonPackage rec {
+  pname = "tiny-proxy";
+  version = "0.2.0";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "romis2012";
+    repo = "tiny-proxy";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-emQRiG2QiuZt4/lI8shJOvMpaqXNyJ/PMvtDZPaoyLo=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    anyio
+  ];
+
+  # The tests depend on httpx-socks, whose tests depend on tiny-proxy.
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "tiny_proxy"
+  ];
+
+  meta = with lib; {
+    description = "SOCKS5/SOCKS4/HTTP proxy server";
+    homepage = "https://github.com/romis2012/tiny-proxy";
+    changelog = "https://github.com/romis2012/tiny-proxy/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ tjni ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index de1960c8336..1dfd4e32504 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -12226,6 +12226,8 @@ self: super: with self; {
     pythonSupport = true;
   });
 
+  tiny-proxy = callPackage ../development/python-modules/tiny-proxy { };
+
   tinycss2 = callPackage ../development/python-modules/tinycss2 { };
 
   tinycss = callPackage ../development/python-modules/tinycss { };