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