nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 python3Packages,
6 python3,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "mtprotoproxy";
11 version = "1.1.1";
12
13 src = fetchFromGitHub {
14 owner = "alexbers";
15 repo = "mtprotoproxy";
16 rev = "v${finalAttrs.version}";
17 sha256 = "sha256-tQ6e1Y25V4qAqBvhhKdirSCYzeALfH+PhNtcHTuBurs=";
18 };
19
20 nativeBuildInputs = with python3Packages; [ wrapPython ];
21 pythonPath = with python3Packages; [
22 pyaes
23 pycrypto
24 uvloop
25 ];
26
27 installPhase = ''
28 install -Dm755 mtprotoproxy.py $out/bin/mtprotoproxy
29 wrapPythonPrograms
30 '';
31
32 meta = {
33 description = "Async MTProto proxy for Telegram";
34 license = lib.licenses.mit;
35 homepage = "https://github.com/alexbers/mtprotoproxy";
36 platforms = python3.meta.platforms;
37 maintainers = [ ];
38 mainProgram = "mtprotoproxy";
39 };
40})