From a5e1da3df1230308562e914a62858365bf8d435a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 21 Jul 2018 09:53:59 +0200 Subject: [PATCH] python.pkgs.audiotools: move expression --- .../python-modules/audiotools/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 22 +-------------- 2 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/audiotools/default.nix diff --git a/pkgs/development/python-modules/audiotools/default.nix b/pkgs/development/python-modules/audiotools/default.nix new file mode 100644 index 000000000000..ee029726d1c6 --- /dev/null +++ b/pkgs/development/python-modules/audiotools/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchurl +, stdenv +, darwin +}: + +buildPythonPackage rec { + pname = "audiotools"; + version = "3.1.1"; + + buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + AudioToolbox + AudioUnit + CoreServices + ]); + + src = fetchurl { + url = "https://github.com/tuffy/python-audio-tools/archive/v${version}.tar.gz"; + sha256 = "0ymlxvqkqhzk4q088qwir3dq0zgwqlrrdfnq7f0iq97g05qshm2c"; + }; + + meta = { + description = "Utilities and Python modules for handling audio"; + homepage = "http://audiotools.sourceforge.net/"; + license = lib.licenses.gpl2Plus; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b8639edce79..bd92733bdfaf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -634,27 +634,7 @@ in { audioread = callPackage ../development/python-modules/audioread { }; - audiotools = buildPythonPackage rec { - name = "audiotools-${version}"; - version = "3.1.1"; - - buildInputs = optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ - AudioToolbox - AudioUnit - CoreServices - ]); - - src = pkgs.fetchurl { - url = "https://github.com/tuffy/python-audio-tools/archive/v${version}.tar.gz"; - sha256 = "0ymlxvqkqhzk4q088qwir3dq0zgwqlrrdfnq7f0iq97g05qshm2c"; - }; - - meta = { - description = "Utilities and Python modules for handling audio"; - homepage = "http://audiotools.sourceforge.net/"; - license = licenses.gpl2Plus; - }; - }; + audiotools = callPackage ../development/python-modules/audiotools { }; autopep8 = callPackage ../development/python-modules/autopep8 { };