From 5bddba89dc7d3dcc68c29bb1fae4c547cf933b25 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 25 Oct 2018 22:00:36 -0400 Subject: [PATCH] pythonPackages.pyaudio: refactor move to python-modules --- .../python-modules/pyaudio/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +------------- 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/pyaudio/default.nix diff --git a/pkgs/development/python-modules/pyaudio/default.nix b/pkgs/development/python-modules/pyaudio/default.nix new file mode 100644 index 000000000000..2f788966718c --- /dev/null +++ b/pkgs/development/python-modules/pyaudio/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPyPy +, pkgs +}: + +buildPythonPackage rec { + pname = "python-pyaudio"; + version = "0.2.9"; + disabled = isPyPy; + + src = fetchPypi { + inherit pname version; + sha256 = "bfd694272b3d1efc51726d0c27650b3c3ba1345f7f8fdada7e86c9751ce0f2a1"; + }; + + buildInputs = [ pkgs.portaudio ]; + + meta = with stdenv.lib; { + description = "Python bindings for PortAudio"; + homepage = "http://people.csail.mit.edu/hubert/pyaudio/"; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3a4ffd0afef9..678c7df705a3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3249,25 +3249,7 @@ in { pyasn1-modules = callPackage ../development/python-modules/pyasn1-modules { }; - pyaudio = buildPythonPackage rec { - name = "python-pyaudio-${version}"; - version = "0.2.9"; - - src = pkgs.fetchurl { - url = "mirror://pypi/P/PyAudio/PyAudio-${version}.tar.gz"; - sha256 = "bfd694272b3d1efc51726d0c27650b3c3ba1345f7f8fdada7e86c9751ce0f2a1"; - }; - - disabled = isPyPy; - - buildInputs = with self; [ pkgs.portaudio ]; - - meta = { - description = "Python bindings for PortAudio"; - homepage = "http://people.csail.mit.edu/hubert/pyaudio/"; - license = licenses.mit; - }; - }; + pyaudio = callPackage ../development/python-modules/pyaudio { }; pysam = callPackage ../development/python-modules/pysam { };