diff --git a/pkgs/development/python-modules/memcached/default.nix b/pkgs/development/python-modules/memcached/default.nix new file mode 100644 index 000000000000..854f7440daa1 --- /dev/null +++ b/pkgs/development/python-modules/memcached/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchurl +, fetchPypi +, isPy3k +}: + +buildPythonPackage rec { + pname = "memcached-1.51"; + version = "1.51"; + + src = if isPy3k then fetchPypi { + inherit pname version; + sha256 = "0na8b369q8fivh3y0nvzbvhh3lgvxiyyv9xp93cnkvwfsr8mkgkw"; + } else fetchurl { + url = "http://ftp.tummy.com/pub/python-memcached/old-releases/python-${pname}-${version}.tar.gz"; + sha256 = "124s98m6hvxj6x90d7aynsjfz878zli771q96ns767r2mbqn7192"; + }; + + meta = with stdenv.lib; { + description = "Python API for communicating with the memcached distributed memory object cache daemon"; + homepage = http://www.tummy.com/Community/software/python-memcached/; + license = licenses.psfl; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8f815b0c69b4..ea3c013fe13e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5839,23 +5839,7 @@ in { meinheld = callPackage ../development/python-modules/meinheld { }; - memcached = buildPythonPackage rec { - name = "memcached-1.51"; - - src = if isPy3k then pkgs.fetchurl { - url = "mirror://pypi/p/python3-memcached/python3-${name}.tar.gz"; - sha256 = "0na8b369q8fivh3y0nvzbvhh3lgvxiyyv9xp93cnkvwfsr8mkgkw"; - } else pkgs.fetchurl { - url = "http://ftp.tummy.com/pub/python-memcached/old-releases/python-${name}.tar.gz"; - sha256 = "124s98m6hvxj6x90d7aynsjfz878zli771q96ns767r2mbqn7192"; - }; - - meta = { - description = "Python API for communicating with the memcached distributed memory object cache daemon"; - homepage = http://www.tummy.com/Community/software/python-memcached/; - }; - }; - + memcached = callPackage ../development/python-modules/memcached { }; memory_profiler = buildPythonPackage rec { name = "memory_profiler-${version}";