2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, scipy, ffmpeg-full }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydub";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "0.25.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
# pypi version doesn't include required data files for tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jiaaro";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "0xskllq66wqndjfmvp58k26cv3w480sqsil6ifwp4gghir7hqc8m";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# disable a test that fails on aarch64 due to rounding errors
|
2021-02-05 17:12:51 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isAarch64 ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace test/test.py \
|
|
|
|
--replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ scipy ffmpeg-full ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
python test/test.py
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Manipulate audio with a simple and easy high level interface.";
|
|
|
|
homepage = "http://pydub.com/";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|