2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonAtLeast
|
|
|
|
, numpy
|
|
|
|
, decorator
|
|
|
|
, imageio
|
|
|
|
, imageio-ffmpeg
|
|
|
|
, proglog
|
|
|
|
, requests
|
|
|
|
, tqdm
|
|
|
|
# Advanced image processing (triples size of output)
|
|
|
|
, advancedProcessing ? false
|
|
|
|
, opencv3 ? null
|
|
|
|
, scikitimage ? null
|
|
|
|
, scikitlearn ? null
|
|
|
|
, scipy ? null
|
|
|
|
, matplotlib ? null
|
|
|
|
, youtube-dl ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert advancedProcessing -> (
|
|
|
|
opencv3 != null && scikitimage != null && scikitlearn != null
|
|
|
|
&& scipy != null && matplotlib != null && youtube-dl != null);
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moviepy";
|
2020-06-02 18:00:15 +00:00
|
|
|
version = "1.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !(pythonAtLeast "3.4");
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-02 18:00:15 +00:00
|
|
|
sha256 = "2884e35d1788077db3ff89e763c5ba7bfddbd7ae9108c9bc809e7ba58fa433f5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# No tests, require network connection
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy decorator imageio imageio-ffmpeg tqdm requests proglog
|
|
|
|
] ++ (stdenv.lib.optionals advancedProcessing [
|
|
|
|
opencv3 scikitimage scikitlearn scipy matplotlib youtube-dl
|
|
|
|
]);
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Video editing with Python";
|
|
|
|
homepage = "https://zulko.github.io/moviepy/";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|