From 1786765934994c3af3703af5a77a06d1f2c29454 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 11:45:20 -0400 Subject: [PATCH] pythonPackages.librosa: refactor move to python-modules --- .../python-modules/librosa/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 22 +------------ 2 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/librosa/default.nix diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix new file mode 100644 index 000000000000..adc740fbcf00 --- /dev/null +++ b/pkgs/development/python-modules/librosa/default.nix @@ -0,0 +1,33 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, joblib +, matplotlib +, six +, scikitlearn +, decorator +, audioread +, resampy +}: + +buildPythonPackage rec { + pname = "librosa"; + version = "0.4.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "209626c53556ca3922e52d2fae767bf5b398948c867fcc8898f948695dacb247"; + }; + + propagatedBuildInputs = [ joblib matplotlib six scikitlearn decorator audioread resampy ]; + + # No tests + doCheck = false; + + meta = with stdenv.lib; { + description = "Python module for audio and music processing"; + homepage = http://librosa.github.io/; + license = licenses.isc; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ec885bac3904..79f8900f76b3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2141,27 +2141,7 @@ in { roman = callPackage ../development/python-modules/roman { }; - librosa = buildPythonPackage rec { - pname = "librosa"; - name = "${pname}-${version}"; - version = "0.4.3"; - src = pkgs.fetchurl { - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; - sha256 = "209626c53556ca3922e52d2fae767bf5b398948c867fcc8898f948695dacb247"; - }; - - propagatedBuildInputs = with self; [ joblib matplotlib six scikitlearn - decorator audioread resampy ]; - - # No tests - doCheck = false; - - meta = { - description = "Python module for audio and music processing"; - homepage = http://librosa.github.io/; - license = licenses.isc; - }; - }; + librosa = callPackage ../development/python-modules/librosa { }; joblib = callPackage ../development/python-modules/joblib { };