summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/imageio-ffmpeg/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/imageio-ffmpeg/default.nix
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/imageio-ffmpeg/default.nix')
-rw-r--r--pkgs/development/python-modules/imageio-ffmpeg/default.nix39
1 files changed, 26 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/imageio-ffmpeg/default.nix b/pkgs/development/python-modules/imageio-ffmpeg/default.nix
index db59ba70bb26..bb186d6594c0 100644
--- a/pkgs/development/python-modules/imageio-ffmpeg/default.nix
+++ b/pkgs/development/python-modules/imageio-ffmpeg/default.nix
@@ -1,29 +1,42 @@
{ lib
, buildPythonPackage
-, fetchPypi
-, fetchpatch
, isPy3k
+, fetchPypi
+, substituteAll
+, ffmpeg
+, python
}:
buildPythonPackage rec {
pname = "imageio-ffmpeg";
- version = "0.4.2";
+ version = "0.4.3";
+
+ disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
- sha256 = "13b05b17a941a9f4a90b16910b1ffac159448cff051a153da8ba4b4343ffa195";
+ sha256 = "f826260a3207b872f1a4ba87ec0c8e02c00afba4fd03348a59049bdd8215841e";
};
- patches = [ (fetchpatch {
- # Fixes compatibility with python3.9
- # Should be included in the next release after 0.4.2
- url = "https://github.com/imageio/imageio-ffmpeg/pull/43/commits/b90c39fe3d29418d67d953588ed9fdf4d848f811.patch";
- sha256 = "0d9kf4w6ldwag3s2dr9zjin6wrj66fnl4fn8379ci4q4qfsqgx3f";
- })];
- disabled = !isPy3k;
+ patches = [
+ (substituteAll {
+ src = ./ffmpeg-path.patch;
+ ffmpeg = "${ffmpeg}/bin/ffmpeg";
+ })
+ ];
+
+ checkPhase = ''
+ runHook preCheck
+
+ ${python.interpreter} << EOF
+ from imageio_ffmpeg import get_ffmpeg_version
+ assert get_ffmpeg_version() == '${ffmpeg.version}'
+ EOF
+
+ runHook postCheck
+ '';
- # No test infrastructure in repository.
- doCheck = false;
+ pythonImportsCheck = [ "imageio_ffmpeg" ];
meta = with lib; {
description = "FFMPEG wrapper for Python";