Merge pull request #331158 from pbsds/bump-ffmpy-1722358363

python312Packages.ffmpy: 0.3.2 -> 0.4.0
This commit is contained in:
Peder Bergebakken Sundt 2024-08-06 07:59:03 +02:00 committed by GitHub
commit 89b05fcdfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
poetry-core,
pytestCheckHook,
go,
ffmpeg-headless,
@ -12,22 +12,24 @@
buildPythonPackage rec {
pname = "ffmpy";
version = "0.3.2";
version = "0.4.0";
pyproject = true;
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.8.1";
src = fetchFromGitHub {
owner = "Ch00k";
repo = "ffmpy";
rev = "refs/tags/${version}";
hash = "sha256-q41JjAWcIiD2nJck5Zzb/lhfIZ3xJGU1I2crsMN0T8Q=";
hash = "sha256-XWI0Hq4vf9Q0/dRzmu1B7EQHdQRkWaNJaBaqusWW7YM=";
};
postPatch = ''
# default to store ffmpeg
substituteInPlace ffmpy.py \
--replace-fail 'executable="ffmpeg",' 'executable="${ffmpeg-headless}/bin/ffmpeg",'
--replace-fail \
'executable: str = "ffmpeg",' \
'executable: str = "${ffmpeg-headless}/bin/ffmpeg",'
# The tests test a mock that does not behave like ffmpeg. If we default to the nix-store ffmpeg they fail.
for fname in tests/*.py; do
@ -37,7 +39,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "ffmpy" ];
nativeBuildInputs = [ setuptools ];
nativeBuildInputs = [ poetry-core ];
nativeCheckInputs = [
pytestCheckHook
@ -52,8 +54,8 @@ buildPythonPackage rec {
# the vendored ffmpeg mock binary assumes FHS
preCheck = ''
rm -v tests/ffmpeg/ffmpeg
HOME=$(mktemp -d) go build -o ffmpeg tests/ffmpeg/ffmpeg.go
export PATH=".:$PATH"
echo Building tests/ffmpeg/ffmpeg...
HOME=$(mktemp -d) go build -o tests/ffmpeg/ffmpeg tests/ffmpeg/ffmpeg.go
'';
meta = with lib; {