From 7fde0dd2ef2a86f2e28074645e6774d0cacff10d Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 15:23:31 -0400 Subject: [PATCH] pythonPackages.etcd: refactor move to python-modules --- .../python-modules/etcd/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +------------- 2 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/etcd/default.nix diff --git a/pkgs/development/python-modules/etcd/default.nix b/pkgs/development/python-modules/etcd/default.nix new file mode 100644 index 000000000000..1e6e1e70944d --- /dev/null +++ b/pkgs/development/python-modules/etcd/default.nix @@ -0,0 +1,34 @@ +{ stdenv +, buildPythonPackage +, fetchurl +, simplejson +, pytz +, requests +}: + +buildPythonPackage rec { + pname = "etcd"; + version = "2.0.8"; + + # PyPI package is incomplete + src = fetchurl { + url = "https://github.com/dsoprea/PythonEtcdClient/archive/${version}.tar.gz"; + sha256 = "0fi6rxa1yxvz7nwrc7dw6fax3041d6bj3iyhywjgbkg7nadi9i8v"; + }; + + patchPhase = '' + sed -i -e '13,14d;37d' setup.py + ''; + + propagatedBuildInputs = [ simplejson pytz requests ]; + + # No proper tests are available + doCheck = false; + + meta = with stdenv.lib; { + description = "A Python etcd client that just works"; + homepage = https://github.com/dsoprea/PythonEtcdClient; + license = licenses.gpl2; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e32e89fe7589..4578dd170078 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1730,31 +1730,7 @@ in { escapism = callPackage ../development/python-modules/escapism { }; - etcd = buildPythonPackage rec { - name = "etcd-${version}"; - version = "2.0.8"; - - # PyPI package is incomplete - src = pkgs.fetchurl { - url = "https://github.com/dsoprea/PythonEtcdClient/archive/${version}.tar.gz"; - sha256 = "0fi6rxa1yxvz7nwrc7dw6fax3041d6bj3iyhywjgbkg7nadi9i8v"; - }; - - patchPhase = '' - sed -i -e '13,14d;37d' setup.py - ''; - - propagatedBuildInputs = with self; [ simplejson pytz requests ]; - - # No proper tests are available - doCheck = false; - - meta = { - description = "A Python etcd client that just works"; - homepage = https://github.com/dsoprea/PythonEtcdClient; - license = licenses.gpl2; - }; - }; + etcd = callPackage ../development/python-modules/etcd { }; evdev = callPackage ../development/python-modules/evdev {};