File tree Expand file tree Collapse file tree 1 file changed +30
-8
lines changed
pkgs/development/python-modules/python-ffmpeg Expand file tree Collapse file tree 1 file changed +30
-8
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
33 buildPythonPackage ,
4+ fetchFromGitHub ,
5+ ffmpeg-headless ,
6+ setuptools ,
47 pyee ,
5- fetchPypi ,
6- setuptools-scm ,
8+ pytestCheckHook ,
9+ pytest-asyncio ,
710} :
811
912buildPythonPackage rec {
10- pname = "python_ffmpeg " ;
13+ pname = "python-ffmpeg " ;
1114 version = "2.0.12" ;
1215 pyproject = true ;
1316
14- src = fetchPypi {
15- inherit pname version ;
16- sha256 = "GayAr1oGSi9TwkWvGpCbLXZI6gRVANltO81Qe4jUPcc=" ;
17+ src = fetchFromGitHub {
18+ owner = "jonghwanhyeon" ;
19+ repo = "python-ffmpeg" ;
20+ tag = "v${ version } " ;
21+ hash = "sha256-1dhkjrg7QUtYSyEV9c88HphdcFuSCSaGJqVAQmMF/5E=" ;
1722 } ;
1823
19- propagatedBuildInputs = [ pyee ] ;
24+ postPatch = ''
25+ substituteInPlace ffmpeg/{ffmpeg.py,asyncio/ffmpeg.py,protocol.py} \
26+ --replace-fail 'executable: str = "ffmpeg"' 'executable: str = "${ lib . getExe ffmpeg-headless } "'
27+ substituteInPlace tests/helpers.py \
28+ --replace-fail '"ffprobe"' '"${ lib . getExe' ffmpeg-headless "ffprobe" } "'
29+
30+ # Some systems can finish before the `0.1` timeout.
31+ substituteInPlace tests/test_{,asyncio_}timeout.py \
32+ --replace-fail 'ffmpeg.execute(timeout=0.1)' 'ffmpeg.execute(timeout=0.01)'
33+ '' ;
34+
35+ build-system = [ setuptools ] ;
36+
37+ dependencies = [ pyee ] ;
38+
39+ nativeCheckInputs = [
40+ pytestCheckHook
41+ pytest-asyncio
42+ ] ;
2043
21- nativeBuildInputs = [ setuptools-scm ] ;
2244 pythonImportsCheck = [ "ffmpeg" ] ;
2345
2446 meta = {
You can’t perform that action at this time.
0 commit comments