diff --git a/pkgs/development/python-modules/audioread/default.nix b/pkgs/development/python-modules/audioread/default.nix index fc3bd9b2c43e..fffd8d21c87c 100644 --- a/pkgs/development/python-modules/audioread/default.nix +++ b/pkgs/development/python-modules/audioread/default.nix @@ -1,28 +1,41 @@ { lib, buildPythonPackage, - fetchPypi, - flit-core, + fetchFromGitHub, + poetry-core, + standard-aifc, + standard-sunau, + ffmpeg-headless, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "audioread"; - version = "3.0.1"; + version = "3.1.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-rFRgpUmMSL3y6OdnQCWDpNzRP0QU0ob0LOQ3nos1Bm0="; + src = fetchFromGitHub { + owner = "sampsyo"; + repo = "audioread"; + tag = "v${finalAttrs.version}"; + hash = "sha256-QvgwjUGuzeHH69YAdZdImjMT+9t4YxAukbuZKk0lBro="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ poetry-core ]; - # No tests, need to disable or py3k breaks - doCheck = false; + dependencies = [ + standard-aifc + standard-sunau + ]; + + nativeCheckInputs = [ + ffmpeg-headless + pytestCheckHook + ]; meta = { description = "Cross-platform audio decoding"; homepage = "https://github.com/sampsyo/audioread"; license = lib.licenses.mit; }; -} +})