mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 21:03:45 +03:00
36 lines
843 B
Nix
36 lines
843 B
Nix
|
{ lib, buildPythonPackage, pythonOlder
|
||
|
, fetchFromGitHub ? null, fetchPypi ? null, fetchpatch ? null
|
||
|
, pyaes, rsa
|
||
|
, version
|
||
|
, useRelease ? true
|
||
|
}:
|
||
|
|
||
|
assert useRelease -> fetchPypi != null;
|
||
|
assert !useRelease -> fetchFromGitHub != null;
|
||
|
let
|
||
|
common = import ./common.nix {
|
||
|
inherit lib fetchFromGitHub fetchPypi fetchpatch;
|
||
|
};
|
||
|
versions = {
|
||
|
"1.8.0" = {
|
||
|
pypiSha256 = "099br8ldjrfzwipv7g202lnjghmqj79j6gicgx11s0vawb5mb3vf";
|
||
|
sourceSha256 = "1q5mcijmjw2m2v3ilw28xnavmcdck5md0k98kwnz0kyx4iqckcv0";
|
||
|
};
|
||
|
};
|
||
|
in buildPythonPackage rec {
|
||
|
pname = "telethon";
|
||
|
inherit version;
|
||
|
|
||
|
src = common.fetchTelethon {
|
||
|
inherit useRelease version;
|
||
|
versionData = versions.${version};
|
||
|
};
|
||
|
|
||
|
propagatedBuildInputs = [ rsa pyaes ];
|
||
|
|
||
|
doCheck = false; # No tests available
|
||
|
|
||
|
disabled = pythonOlder "3.5";
|
||
|
meta = common.meta;
|
||
|
}
|