From 348b2fb38c5d7f41c5c58448e16db822c951f521 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 23:36:16 -0400 Subject: [PATCH] pythonPackages.gmusicapi: refactor move to python-modules --- .../python-modules/gmusicapi/default.nix | 37 +++++++++++++++++++ .../python-modules/helper/default.nix | 29 +++++++++++++++ .../python-modules/hovercraft/default.nix | 36 ++++++++++++++++++ .../python-modules/hsaudiotag/default.nix | 26 +++++++++++++ .../python-modules/hsaudiotag3k/default.nix | 26 +++++++++++++ .../python-modules/httpauth/default.nix | 24 ++++++++++++ .../python-modules/humanize/default.nix | 28 ++++++++++++++ pkgs/top-level/python-packages.nix | 32 +--------------- 8 files changed, 207 insertions(+), 31 deletions(-) create mode 100644 pkgs/development/python-modules/gmusicapi/default.nix create mode 100644 pkgs/development/python-modules/helper/default.nix create mode 100644 pkgs/development/python-modules/hovercraft/default.nix create mode 100644 pkgs/development/python-modules/hsaudiotag/default.nix create mode 100644 pkgs/development/python-modules/hsaudiotag3k/default.nix create mode 100644 pkgs/development/python-modules/httpauth/default.nix create mode 100644 pkgs/development/python-modules/humanize/default.nix diff --git a/pkgs/development/python-modules/gmusicapi/default.nix b/pkgs/development/python-modules/gmusicapi/default.nix new file mode 100644 index 00000000000..f96e94a34a0 --- /dev/null +++ b/pkgs/development/python-modules/gmusicapi/default.nix @@ -0,0 +1,37 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, validictory +, decorator +, mutagen +, protobuf +, setuptools +, requests +, dateutil +, proboscis +, mock +, appdirs +, oauth2client +, pyopenssl +, gpsoauth +, MechanicalSoup +, future +}: + +buildPythonPackage rec { + pname = "gmusicapi"; + version = "10.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0smlrafh1bjzrcjzl7im8pf8f04gcnx92lf3g5qr7yzgq8k20xa2"; + }; + + propagatedBuildInputs = [ validictory decorator mutagen protobuf setuptools requests dateutil proboscis mock appdirs oauth2client pyopenssl gpsoauth MechanicalSoup future ]; + + meta = with stdenv.lib; { + description = "An unofficial API for Google Play Music"; + homepage = https://pypi.python.org/pypi/gmusicapi/; + license = licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/helper/default.nix b/pkgs/development/python-modules/helper/default.nix new file mode 100644 index 00000000000..1f151ebd9ef --- /dev/null +++ b/pkgs/development/python-modules/helper/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, mock +, pyyaml +}: + +buildPythonPackage rec { + pname = "helper"; + version = "2.4.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "4e33dde42ad4df30fb7790689f93d77252cff26a565610d03ff2e434865a53a2"; + }; + + buildInputs = [ mock ]; + propagatedBuildInputs = [ pyyaml ]; + + # No tests + doCheck = false; + + meta = with stdenv.lib; { + description = "Development library for quickly writing configurable applications and daemons"; + homepage = https://helper.readthedocs.org/; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/development/python-modules/hovercraft/default.nix b/pkgs/development/python-modules/hovercraft/default.nix new file mode 100644 index 00000000000..e598fd41bab --- /dev/null +++ b/pkgs/development/python-modules/hovercraft/default.nix @@ -0,0 +1,36 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, docutils +, lxml +, manuel +, pygments +, svg-path +, watchdog +, isPy3k +}: + +buildPythonPackage rec { + pname = "hovercraft"; + version = "2.0"; + disabled = ! isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "0lqxr816lymgnywln8bbv9nrmkyahjjcjkm9kjyny9bflayz4f1g"; + }; + + propagatedBuildInputs = [ docutils lxml manuel pygments svg-path watchdog ]; + + # one test assumes we have docutils 0.12 + # TODO: enable tests after upgrading docutils to 0.12 + doCheck = false; + + meta = with stdenv.lib; { + description = "A tool to make impress.js presentations from reStructuredText"; + homepage = https://github.com/regebro/hovercraft; + license = licenses.mit; + maintainers = with maintainers; [ goibhniu ]; + }; + +} diff --git a/pkgs/development/python-modules/hsaudiotag/default.nix b/pkgs/development/python-modules/hsaudiotag/default.nix new file mode 100644 index 00000000000..d08d9e06b71 --- /dev/null +++ b/pkgs/development/python-modules/hsaudiotag/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +}: + +buildPythonPackage rec { + pname = "hsaudiotag"; + version = "1.1.1"; + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "15hgm128p8nysfi0jb127awga3vlj0iw82l50swjpvdh01m7rda8"; + }; + + # no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "A pure Python library that lets one to read metadata from media files"; + homepage = http://hg.hardcoded.net/hsaudiotag/; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/development/python-modules/hsaudiotag3k/default.nix b/pkgs/development/python-modules/hsaudiotag3k/default.nix new file mode 100644 index 00000000000..06f89f73333 --- /dev/null +++ b/pkgs/development/python-modules/hsaudiotag3k/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +}: + +buildPythonPackage rec { + pname = "hsaudiotag3k"; + version = "1.1.3"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "0bv5k5594byr2bmhh77xv10fkdpckcmxg3w380yp30aqf83rcsx3"; + }; + + # no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "A pure Python library that lets one to read metadata from media files"; + homepage = http://hg.hardcoded.net/hsaudiotag/; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/development/python-modules/httpauth/default.nix b/pkgs/development/python-modules/httpauth/default.nix new file mode 100644 index 00000000000..f1afd41ebed --- /dev/null +++ b/pkgs/development/python-modules/httpauth/default.nix @@ -0,0 +1,24 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + version = "0.3"; + pname = "httpauth"; + + src = fetchPypi { + inherit pname version; + sha256 = "0qas7876igyz978pgldp5r7n7pis8n4vf0v87gxr9l7p7if5lr3l"; + }; + + doCheck = false; + + meta = with stdenv.lib; { + description = "WSGI HTTP Digest Authentication middleware"; + homepage = https://github.com/jonashaag/httpauth; + license = licenses.bsd2; + maintainers = with maintainers; [ ]; + }; + +} diff --git a/pkgs/development/python-modules/humanize/default.nix b/pkgs/development/python-modules/humanize/default.nix new file mode 100644 index 00000000000..25c335c0016 --- /dev/null +++ b/pkgs/development/python-modules/humanize/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, mock +}: + +buildPythonPackage rec { + version = "0.5.1"; + pname = "humanize"; + + src = fetchPypi { + inherit pname version; + sha256 = "a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19"; + }; + + buildInputs = [ mock ]; + + doCheck = false; + + meta = with stdenv.lib; { + description = "Python humanize utilities"; + homepage = https://github.com/jmoiron/humanize; + license = licenses.mit; + maintainers = with maintainers; [ ]; + platforms = platforms.linux; # can only test on linux + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 33765975b06..cb53bafac47 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1812,38 +1812,8 @@ in { gmpy2 = callPackage ../development/python-modules/gmpy2 { }; - gmusicapi = with pkgs; buildPythonPackage rec { - name = "gmusicapi-10.1.0"; + gmusicapi = callPackage ../development/python-modules/gmusicapi { }; - src = pkgs.fetchurl { - url = "mirror://pypi/g/gmusicapi/gmusicapi-10.1.0.tar.gz"; - sha256 = "0smlrafh1bjzrcjzl7im8pf8f04gcnx92lf3g5qr7yzgq8k20xa2"; - }; - - propagatedBuildInputs = with self; [ - validictory - decorator - mutagen - protobuf - setuptools - requests - dateutil - proboscis - mock - appdirs - oauth2client - pyopenssl - gpsoauth - MechanicalSoup - future - ]; - - meta = { - description = "An unofficial API for Google Play Music"; - homepage = https://pypi.python.org/pypi/gmusicapi/; - license = licenses.bsd3; - }; - }; gnureadline = buildPythonPackage rec { version = "6.3.3";