2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, scipy, ffmpeg-full }:
|
2017-09-14 06:40:37 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydub";
|
2020-07-07 00:51:55 +00:00
|
|
|
version = "0.24.1";
|
2018-09-10 16:05:40 +00:00
|
|
|
# pypi version doesn't include required data files for tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jiaaro";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-07-07 00:51:55 +00:00
|
|
|
sha256 = "1pv4n54kkjpbjlvwh9b6a7zyq1ylg0fjmd2q4ws9nc2a6mrcivhc";
|
2017-09-14 06:40:37 +00:00
|
|
|
};
|
|
|
|
|
2018-09-10 20:36:14 +00:00
|
|
|
|
|
|
|
# disable a test that fails on aarch64 due to rounding errors
|
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
|
|
|
|
substituteInPlace test/test.py \
|
|
|
|
--replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change"
|
|
|
|
'';
|
|
|
|
|
2017-09-14 06:40:37 +00:00
|
|
|
checkInputs = [ scipy ffmpeg-full ];
|
|
|
|
|
2018-09-10 16:05:40 +00:00
|
|
|
checkPhase = ''
|
|
|
|
python test/test.py
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-09-14 06:40:37 +00:00
|
|
|
description = "Manipulate audio with a simple and easy high level interface.";
|
|
|
|
homepage = "http://pydub.com/";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|