diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/mtprotoproxy/default.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/mtprotoproxy/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/mtprotoproxy/default.nix b/nixpkgs/pkgs/servers/mtprotoproxy/default.nix new file mode 100644 index 000000000000..44ecc6481ecd --- /dev/null +++ b/nixpkgs/pkgs/servers/mtprotoproxy/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, python, pyaes, pycrypto, uvloop, wrapPython }: + +stdenv.mkDerivation rec { + pname = "mtprotoproxy"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "alexbers"; + repo = "mtprotoproxy"; + rev = "v${version}"; + sha256 = "sha256-tQ6e1Y25V4qAqBvhhKdirSCYzeALfH+PhNtcHTuBurs="; + }; + + nativeBuildInputs = [ wrapPython ]; + pythonPath = [ pyaes pycrypto uvloop ]; + + installPhase = '' + install -Dm755 mtprotoproxy.py $out/bin/mtprotoproxy + wrapPythonPrograms + ''; + + meta = with lib; { + description = "Async MTProto proxy for Telegram"; + license = licenses.mit; + homepage = "https://github.com/alexbers/mtprotoproxy"; + platforms = python.meta.platforms; + maintainers = with maintainers; [ abbradar ]; + mainProgram = "mtprotoproxy"; + }; +} |