From 44a18ddd317e47d7330b56077fef8be3f4a66c80 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 26 Jul 2017 20:32:29 +0300 Subject: python.pkgs: move my several packages to separate files --- .../python-modules/hmmlearn/default.nix | 23 ++++++++ .../python-modules/pychromecast/default.nix | 21 +++++++ .../development/python-modules/sphfile/default.nix | 23 ++++++++ pkgs/top-level/python-packages.nix | 66 ++-------------------- 4 files changed, 72 insertions(+), 61 deletions(-) create mode 100644 pkgs/development/python-modules/hmmlearn/default.nix create mode 100644 pkgs/development/python-modules/pychromecast/default.nix create mode 100644 pkgs/development/python-modules/sphfile/default.nix (limited to 'pkgs') diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix new file mode 100644 index 000000000000..eeb042452155 --- /dev/null +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildPythonPackage, numpy }: + +buildPythonPackage rec { + name = "hmmlearn-${version}"; + version = "0.2.0"; + + src = fetchurl { + url = "mirror://pypi/h/hmmlearn/${name}.tar.gz"; + sha256 = "0qc3fkdyrgfg31y1a8jzs83dxkjw78pqkdm44lll1iib63w4cik9"; + }; + + propagatedBuildInputs = [ numpy ]; + + doCheck = false; + + meta = with lib; { + description = "Hidden Markov Models in Python with scikit-learn like API"; + homepage = "https://github.com/hmmlearn/hmmlearn"; + license = licenses.bsd3; + maintainers = with maintainers; [ abbradar ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/python-modules/pychromecast/default.nix b/pkgs/development/python-modules/pychromecast/default.nix new file mode 100644 index 000000000000..440a1aa7785e --- /dev/null +++ b/pkgs/development/python-modules/pychromecast/default.nix @@ -0,0 +1,21 @@ +{ lib, fetchurl, buildPythonPackage, requests, six, zeroconf, protobuf }: + +buildPythonPackage rec { + name = "PyChromecast-${version}"; + version = "0.8.1"; + + src = fetchurl { + url = "mirror://pypi/p/pychromecast/${name}.tar.gz"; + sha256 = "05rlr2hjng0xg2a9k9vwmrlvd7vy9sjhxxfl96kx25xynlkq6yq6"; + }; + + propagatedBuildInputs = [ requests six zeroconf protobuf ]; + + meta = with lib; { + description = "Library for Python 2 and 3 to communicate with the Google Chromecast"; + homepage = "https://github.com/balloob/pychromecast"; + license = licenses.mit; + maintainers = with maintainers; [ abbradar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/python-modules/sphfile/default.nix b/pkgs/development/python-modules/sphfile/default.nix new file mode 100644 index 000000000000..8c2351c981e9 --- /dev/null +++ b/pkgs/development/python-modules/sphfile/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildPythonPackage, numpy }: + +buildPythonPackage rec { + name = "sphfile-${version}"; + version = "1.0.0"; + + src = fetchurl { + url = "mirror://pypi/s/sphfile/${name}.tar.gz"; + sha256 = "1ly9746xrzbiax9cxr5sxlg0wvf6fdxcrgwsqqxckk3wnqfypfrd"; + }; + + propagatedBuildInputs = [ numpy ]; + + doCheck = false; + + meta = with lib; { + description = "Numpy-based NIST SPH audio-file reader"; + homepage = "https://github.com/mcfletch/sphfile"; + license = licenses.mit; + maintainers = with maintainers; [ abbradar ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b57a508433d1..5a817b752925 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -194,24 +194,8 @@ in { pycryptodome = callPackage ../development/python-modules/pycryptodome { }; - PyChromecast = buildPythonPackage rec { - name = "PyChromecast-${version}"; - version = "0.8.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pychromecast/${name}.tar.gz"; - sha256 = "05rlr2hjng0xg2a9k9vwmrlvd7vy9sjhxxfl96kx25xynlkq6yq6"; - }; - - propagatedBuildInputs = with self; [ requests six zeroconf protobuf3_2 ]; - - meta = { - description = "Library for Python 2 and 3 to communicate with the Google Chromecast"; - homepage = "https://github.com/balloob/pychromecast"; - license = licenses.mit; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.linux; - }; + PyChromecast = callPackage ../development/python-modules/pychromecast { + protobuf = self.protobuf3_2; }; pyexiv2 = if (!isPy3k) then callPackage ../development/python-modules/pyexiv2 {} else throw "pyexiv2 not supported for interpreter ${python.executable}"; @@ -11363,49 +11347,7 @@ in { propagatedBuildInputs = with self; [ requests webob ]; }; - hmmlearn = buildPythonPackage rec { - name = "hmmlearn-${version}"; - version = "0.2.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/h/hmmlearn/${name}.tar.gz"; - sha256 = "0qc3fkdyrgfg31y1a8jzs83dxkjw78pqkdm44lll1iib63w4cik9"; - }; - - propagatedBuildInputs = with self; [ numpy ]; - - doCheck = false; - - meta = { - description = "Hidden Markov Models in Python with scikit-learn like API"; - homepage = "https://github.com/hmmlearn/hmmlearn"; - license = licenses.bsd3; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - }; - }; - - sphfile = buildPythonPackage rec { - name = "sphfile-${version}"; - version = "1.0.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/sphfile/${name}.tar.gz"; - sha256 = "1ly9746xrzbiax9cxr5sxlg0wvf6fdxcrgwsqqxckk3wnqfypfrd"; - }; - - propagatedBuildInputs = with self; [ numpy ]; - - doCheck = false; - - meta = { - description = "Numpy-based NIST SPH audio-file reader"; - homepage = "https://github.com/mcfletch/sphfile"; - license = licenses.mit; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - }; - }; + hmmlearn = callPackage ../development/python-modules/hmmlearn { }; hcs_utils = buildPythonPackage rec { name = "hcs_utils-1.5"; @@ -21967,6 +21909,8 @@ in { }; }; + sphfile = callPackage ../development/python-modules/sphfile { }; + sqlite3dbm = buildPythonPackage rec { name = "sqlite3dbm-0.1.4"; disabled = isPy3k; -- cgit 1.4.1