1{ stdenv, buildPythonPackage, fetchFromGitHub, scipy, ffmpeg-full }:
2
3buildPythonPackage rec {
4 pname = "pydub";
5 version = "0.24.1";
6 # pypi version doesn't include required data files for tests
7 src = fetchFromGitHub {
8 owner = "jiaaro";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "1pv4n54kkjpbjlvwh9b6a7zyq1ylg0fjmd2q4ws9nc2a6mrcivhc";
12 };
13
14
15 # disable a test that fails on aarch64 due to rounding errors
16 postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
17 substituteInPlace test/test.py \
18 --replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change"
19 '';
20
21 checkInputs = [ scipy ffmpeg-full ];
22
23 checkPhase = ''
24 python test/test.py
25 '';
26
27 meta = with stdenv.lib; {
28 description = "Manipulate audio with a simple and easy high level interface.";
29 homepage = "http://pydub.com/";
30 license = licenses.mit;
31 platforms = platforms.all;
32 };
33}