uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, substituteAll
, ffmpeg_4
, python
}:
buildPythonPackage rec {
pname = "imageio-ffmpeg";
version = "0.4.5";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "f2ea4245a2adad25dedf98d343159579167e549ac8c4691cef5eff980e20c139";
};
patches = [
(substituteAll {
src = ./ffmpeg-path.patch;
ffmpeg = "${ffmpeg_4}/bin/ffmpeg";
})
];
checkPhase = ''
runHook preCheck
${python.interpreter} << EOF
from imageio_ffmpeg import get_ffmpeg_version
assert get_ffmpeg_version() == '${ffmpeg_4.version}'
EOF
runHook postCheck
'';
pythonImportsCheck = [ "imageio_ffmpeg" ];
meta = with lib; {
description = "FFMPEG wrapper for Python";
homepage = "https://github.com/imageio/imageio-ffmpeg";
license = licenses.bsd2;
maintainers = [ maintainers.pmiddend ];
};
}

View file

@ -0,0 +1,39 @@
diff --git a/imageio_ffmpeg/_utils.py b/imageio_ffmpeg/_utils.py
index 1399cfd..c0eb9be 100644
--- a/imageio_ffmpeg/_utils.py
+++ b/imageio_ffmpeg/_utils.py
@@ -23,33 +23,7 @@ def get_ffmpeg_exe():
if exe:
return exe
- plat = get_platform()
-
- # 2. Try from here
- bin_dir = resource_filename("imageio_ffmpeg", "binaries")
- exe = os.path.join(bin_dir, FNAME_PER_PLATFORM.get(plat, ""))
- if exe and os.path.isfile(exe) and _is_valid_exe(exe):
- return exe
-
- # 3. Try binary from conda package
- # (installed e.g. via `conda install ffmpeg -c conda-forge`)
- if plat.startswith("win"):
- exe = os.path.join(sys.prefix, "Library", "bin", "ffmpeg.exe")
- else:
- exe = os.path.join(sys.prefix, "bin", "ffmpeg")
- if exe and os.path.isfile(exe) and _is_valid_exe(exe):
- return exe
-
- # 4. Try system ffmpeg command
- exe = "ffmpeg"
- if _is_valid_exe(exe):
- return exe
-
- # Nothing was found
- raise RuntimeError(
- "No ffmpeg exe could be found. Install ffmpeg on your system, "
- "or set the IMAGEIO_FFMPEG_EXE environment variable."
- )
+ return '@ffmpeg@'
def _popen_kwargs(prevent_sigint=False):