From b4046017a7bcd96b462acec55afab8d9bfade7dc Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 8 Sep 2019 12:01:17 +0200 Subject: [PATCH] Bump nix expressions to 1.10 --- default.nix | 4 +++- nix/extended.nix | 2 ++ nix/telethon/1.10.nix | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 nix/telethon/1.10.nix diff --git a/default.nix b/default.nix index 5685a681..d67c1506 100644 --- a/default.nix +++ b/default.nix @@ -25,7 +25,9 @@ rec { telethon = telethon_1; telethon-devel = self.callPackage ./nix/telethon/devel.nix { }; - telethon_1 = telethon_1_9; + telethon_1 = telethon_1_10; + telethon_1_10 = telethon_1_10_0; + telethon_1_10_0 = telethonPkg "1.10" { version = "1.10.0"; }; telethon_1_9 = telethon_1_9_0; telethon_1_9_0 = telethonPkg "1.9" { version = "1.9.0"; }; telethon_1_8 = telethon_1_8_0; diff --git a/nix/extended.nix b/nix/extended.nix index 01a087ed..5471221c 100644 --- a/nix/extended.nix +++ b/nix/extended.nix @@ -29,6 +29,8 @@ let [ "telethon-devel" "telethon-devel" ] [ "telethon_1" "telethon_1" ] + [ "telethon_1_10" "telethon_1_10" ] + [ "telethon_1_10_0" "telethon_1_10_0" ] [ "telethon_1_9" "telethon_1_9" ] [ "telethon_1_9_0" "telethon_1_9_0" ] [ "telethon_1_8" "telethon_1_8" ] diff --git a/nix/telethon/1.10.nix b/nix/telethon/1.10.nix new file mode 100644 index 00000000..0132b92f --- /dev/null +++ b/nix/telethon/1.10.nix @@ -0,0 +1,35 @@ +{ 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.10.0" = { + pypiSha256 = "1n2g2r5w44nlhn229r8kamhwjxggv16gl3jxq25bpg5y4qgrxzd8"; + sourceSha256 = "1rvrc63j6i7yr887g2csciv4zyy407yhdn4n8q2q00dkildh64qw"; + }; + }; +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; +}