From 2a69ddb69b50481fc1fd59b4f417faef58495755 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 9 Jun 2019 11:18:59 +0300 Subject: [PATCH] mtprotoproxy: init at 1.0.5 --- pkgs/servers/mtprotoproxy/default.nix | 29 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/servers/mtprotoproxy/default.nix diff --git a/pkgs/servers/mtprotoproxy/default.nix b/pkgs/servers/mtprotoproxy/default.nix new file mode 100644 index 000000000000..69c7f137e3dc --- /dev/null +++ b/pkgs/servers/mtprotoproxy/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, python, pyaes, pycrypto, wrapPython }: + +stdenv.mkDerivation rec { + pname = "mtprotoproxy"; + version = "1.0.5"; + + src = fetchFromGitHub { + owner = "alexbers"; + repo = "mtprotoproxy"; + rev = "v${version}"; + sha256 = "11jaz01cagmqadyxkks7dx41ggg6pp2l1ia9npqyrl2xhcxm5b0x"; + }; + + nativeBuildInputs = [ wrapPython ]; + pythonPath = [ pyaes pycrypto ]; + + installPhase = '' + install -Dm755 mtprotoproxy.py $out/bin/mtprotoproxy + wrapPythonPrograms + ''; + + meta = with stdenv.lib; { + description = "Async MTProto proxy for Telegram"; + license = licenses.mit; + homepage = https://github.com/alexbers/mtprotoproxy; + platforms = python.meta.platforms; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0cabf27cb6f5..453123827985 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14301,6 +14301,8 @@ in mpdscribble = callPackage ../tools/misc/mpdscribble { }; + mtprotoproxy = python3.pkgs.callPackage ../servers/mtprotoproxy { }; + micro-httpd = callPackage ../servers/http/micro-httpd { }; miniHttpd = callPackage ../servers/http/mini-httpd {};