diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dab241f6e8a6..73d35645ff0d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -22220,18 +22220,41 @@ in { doCheck = false; }; - pydns = buildPythonPackage rec { - name = "pydns-2.3.6"; - disabled = isPy3k; + pydns = + let + py3 = buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "py3dns"; + version = "3.1.1a"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/pydns/${name}.tar.gz"; - sha256 = "0qnv7i9824nb5h9psj0rwzjyprwgfiwh5s5raa9avbqazy5hv5pi"; - }; + src = fetchPypi { + inherit pname version; + sha256 = "0z0qmx9j1ivpgg54gqqmh42ljnzxaychc5inz2gbgv0vls765smz"; + }; - doCheck = false; + preConfigure = '' + sed -i \ + -e '/import DNS/d' \ + -e 's/DNS.__version__/"${version}"/g' \ + setup.py + ''; - }; + doCheck = false; + }; + + py2 = buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "pydns"; + version = "2.3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0qnv7i9824nb5h9psj0rwzjyprwgfiwh5s5raa9avbqazy5hv5pi"; + }; + + doCheck = false; + }; + in if isPy3k then py3 else py2; pythondaemon = buildPythonPackage rec { name = "python-daemon-${version}";