From 91516e5e39bc5cf4292e2ad52af48ebc6c1983b6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 24 Mar 2021 11:54:25 +0100 Subject: [PATCH] python2Packages.idna: keep 2.10 --- pkgs/development/python-modules/idna/2.nix | 20 ++++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/idna/2.nix diff --git a/pkgs/development/python-modules/idna/2.nix b/pkgs/development/python-modules/idna/2.nix new file mode 100644 index 00000000000..613fde773a7 --- /dev/null +++ b/pkgs/development/python-modules/idna/2.nix @@ -0,0 +1,20 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "idna"; + version = "2.10"; + + src = fetchPypi { + inherit pname version; + sha256 = "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"; + }; + + meta = { + homepage = "https://github.com/kjd/idna/"; + description = "Internationalized Domain Names in Applications (IDNA)"; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9e76151e7b6..80e9b27fc11 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3241,7 +3241,10 @@ in { identify = callPackage ../development/python-modules/identify { }; - idna = callPackage ../development/python-modules/idna { }; + idna = if isPy3k then + callPackage ../development/python-modules/idna { } + else + callPackage ../development/python-modules/idna/2.nix { }; idna-ssl = callPackage ../development/python-modules/idna-ssl { };