From c0fc1670f5a889a991c8ab7b035d30e3d7dbf98c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Sat, 12 Aug 2017 11:17:35 +0100
Subject: [PATCH] pythonPackages.umemcache: move expression out of
 python-packages.nix

---
 .../python-modules/umemcache/default.nix      | 20 +++++++++++++++++++
 pkgs/top-level/python-packages.nix            | 19 +-----------------
 2 files changed, 21 insertions(+), 18 deletions(-)
 create mode 100644 pkgs/development/python-modules/umemcache/default.nix

diff --git a/pkgs/development/python-modules/umemcache/default.nix b/pkgs/development/python-modules/umemcache/default.nix
new file mode 100644
index 000000000000..4d09fda83da4
--- /dev/null
+++ b/pkgs/development/python-modules/umemcache/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, buildPythonPackage, isPy3k, fetchurl }:
+
+buildPythonPackage rec {
+  name = "umemcache-${version}";
+  version = "1.6.3";
+  disabled = isPy3k;
+
+  src = fetchurl {
+    url = "mirror://pypi/u/umemcache/${name}.zip";
+    sha256 = "211031a03576b7796bf277dbc9c9e3e754ba066bbb7fb601ab5c6291b8ec1918";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "Ultra fast memcache client written in highly optimized C++ with Python bindings";
+    homepage = https://github.com/esnme/ultramemcache;
+    license = licenses.bsdOriginal;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index de64b64bed7e..cbf654b98900 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -23658,24 +23658,7 @@ in {
 
   };
 
-  umemcache = buildPythonPackage rec {
-    name = "umemcache-${version}";
-    version = "1.6.3";
-    disabled = isPy3k;
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/u/umemcache/${name}.zip";
-      sha256 = "211031a03576b7796bf277dbc9c9e3e754ba066bbb7fb601ab5c6291b8ec1918";
-    };
-
-    hardeningDisable = [ "format" ];
-
-    meta = {
-      description = "Ultra fast memcache client written in highly optimized C++ with Python bindings";
-      homepage = https://github.com/esnme/ultramemcache;
-      license = licenses.bsdOriginal;
-    };
-  };
+  umemcache = callPackage ../development/python-modules/umemcache {};
 
   unicodecsv = buildPythonPackage rec {
     version = "0.14.1";