1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 ffmpeg-full,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "pydub";
14 version = "0.25.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "jiaaro";
21 repo = "pydub";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-FTEMT47wPXK5i4ZGjTVAhI/NjJio3F2dbBZzYzClU3c=";
24 };
25
26 patches = [
27 # Fix test assertions, https://github.com/jiaaro/pydub/pull/769
28 (fetchpatch {
29 name = "fix-assertions.patch";
30 url = "https://github.com/jiaaro/pydub/commit/66c1bf7813ae8621a71484fdcdf609734c0d8efd.patch";
31 hash = "sha256-3OIzvTgGK3r4/s5y7izHvouB4uJEmjO6cgKvegtTf7A=";
32 })
33 ];
34
35 nativeBuildInputs = [ setuptools ];
36
37 nativeCheckInputs = [
38 ffmpeg-full
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [
43 "pydub"
44 "pydub.audio_segment"
45 "pydub.playback"
46 ];
47
48 pytestFlagsArray = [ "test/test.py" ];
49
50 meta = with lib; {
51 description = "Manipulate audio with a simple and easy high level interface";
52 homepage = "http://pydub.com";
53 changelog = "https://github.com/jiaaro/pydub/blob/v${version}/CHANGELOG.md";
54 license = licenses.mit;
55 maintainers = with maintainers; [ ];
56 };
57}