2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-16 22:00:18 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-04-19 15:10:20 +00:00
|
|
|
, pythonAtLeast
|
2018-10-16 22:00:18 +00:00
|
|
|
, numpy
|
|
|
|
, decorator
|
|
|
|
, imageio
|
2019-04-19 01:31:56 +00:00
|
|
|
, imageio-ffmpeg
|
|
|
|
, proglog
|
|
|
|
, requests
|
2018-10-16 22:00:18 +00:00
|
|
|
, tqdm
|
2019-04-19 16:44:36 +00:00
|
|
|
# Advanced image processing (triples size of output)
|
|
|
|
, advancedProcessing ? false
|
2019-11-28 22:16:04 +00:00
|
|
|
, opencv3 ? null
|
2019-04-19 16:44:36 +00:00
|
|
|
, scikitimage ? null
|
2021-05-14 18:46:36 +00:00
|
|
|
, scikit-learn ? null
|
2019-04-19 16:44:36 +00:00
|
|
|
, scipy ? null
|
|
|
|
, matplotlib ? null
|
|
|
|
, youtube-dl ? null
|
2018-10-16 22:00:18 +00:00
|
|
|
}:
|
|
|
|
|
2019-04-19 16:44:36 +00:00
|
|
|
assert advancedProcessing -> (
|
2021-05-14 18:46:36 +00:00
|
|
|
opencv3 != null && scikitimage != null && scikit-learn != null
|
2019-04-19 16:44:36 +00:00
|
|
|
&& scipy != null && matplotlib != null && youtube-dl != null);
|
|
|
|
|
2018-10-16 22:00:18 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moviepy";
|
2020-05-09 10:01:51 +00:00
|
|
|
version = "1.0.3";
|
2018-10-16 22:00:18 +00:00
|
|
|
|
2019-04-19 15:10:20 +00:00
|
|
|
disabled = !(pythonAtLeast "3.4");
|
|
|
|
|
2018-10-16 22:00:18 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 10:01:51 +00:00
|
|
|
sha256 = "2884e35d1788077db3ff89e763c5ba7bfddbd7ae9108c9bc809e7ba58fa433f5";
|
2018-10-16 22:00:18 +00:00
|
|
|
};
|
|
|
|
|
2019-04-19 16:44:36 +00:00
|
|
|
# No tests, require network connection
|
2018-10-16 22:00:18 +00:00
|
|
|
doCheck = false;
|
2019-04-19 16:44:36 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy decorator imageio imageio-ffmpeg tqdm requests proglog
|
2021-01-24 00:29:22 +00:00
|
|
|
] ++ (lib.optionals advancedProcessing [
|
2021-05-14 18:46:36 +00:00
|
|
|
opencv3 scikitimage scikit-learn scipy matplotlib youtube-dl
|
2019-04-19 16:44:36 +00:00
|
|
|
]);
|
2018-10-16 22:00:18 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-16 22:00:18 +00:00
|
|
|
description = "Video editing with Python";
|
2020-03-27 23:05:50 +00:00
|
|
|
homepage = "https://zulko.github.io/moviepy/";
|
2018-10-16 22:00:18 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|