From 7300b2c7141469b1e69776e79c78dfbf6178813f Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 16:41:29 -0400 Subject: [PATCH] pythonPackages.goobook: refactor move to python-modules --- .../python-modules/goobook/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +------------ 2 files changed, 39 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/goobook/default.nix diff --git a/pkgs/development/python-modules/goobook/default.nix b/pkgs/development/python-modules/goobook/default.nix new file mode 100644 index 000000000000..91a99103af57 --- /dev/null +++ b/pkgs/development/python-modules/goobook/default.nix @@ -0,0 +1,38 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +, oauth2client +, gdata +, simplejson +, httplib2 +, keyring +, six +, rsa +}: + +buildPythonPackage rec { + pname = "goobook"; + version = "1.9"; + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "02xmq8sjavza17av44ks510934wrshxnsm6lvhvazs45s92b671i"; + }; + + propagatedBuildInputs = [ oauth2client gdata simplejson httplib2 keyring six rsa ]; + + preConfigure = '' + sed -i '/distribute/d' setup.py + ''; + + meta = with stdenv.lib; { + description = "Search your google contacts from the command-line or mutt"; + homepage = https://pypi.python.org/pypi/goobook; + license = licenses.gpl3; + maintainers = with maintainers; [ lovek323 hbunke ]; + platforms = platforms.unix; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 369c6945562d..2456cb9d6923 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2390,31 +2390,7 @@ in { github-webhook = callPackage ../development/python-modules/github-webhook { }; - goobook = buildPythonPackage rec { - name = "goobook-1.9"; - disabled = isPy3k; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/goobook/${name}.tar.gz"; - sha256 = "02xmq8sjavza17av44ks510934wrshxnsm6lvhvazs45s92b671i"; - }; - - buildInputs = with self; [ ]; - - preConfigure = '' - sed -i '/distribute/d' setup.py - ''; - - meta = { - description = "Search your google contacts from the command-line or mutt"; - homepage = https://pypi.python.org/pypi/goobook; - license = licenses.gpl3; - maintainers = with maintainers; [ lovek323 hbunke ]; - platforms = platforms.unix; - }; - - propagatedBuildInputs = with self; [ oauth2client gdata simplejson httplib2 keyring six rsa ]; - }; + goobook = callPackage ../development/python-modules/goobook { }; googleapis_common_protos = callPackage ../development/python-modules/googleapis_common_protos { };