2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, ffmpeg-full
|
|
|
|
, python
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydub";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "0.25.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pydub"
|
|
|
|
"pydub.audio_segment"
|
|
|
|
"pydub.playback"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
ffmpeg-full
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2022-01-13 20:06:32 +00:00
|
|
|
${python.interpreter} test/test.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Manipulate audio with a simple and easy high level interface";
|
|
|
|
homepage = "http://pydub.com";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|