2018-10-16 23:00:18 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-04-19 16:10:20 +01:00
|
|
|
, pythonAtLeast
|
2018-10-16 23:00:18 +01:00
|
|
|
, numpy
|
|
|
|
, decorator
|
|
|
|
, imageio
|
2019-04-19 02:31:56 +01:00
|
|
|
, imageio-ffmpeg
|
|
|
|
, proglog
|
|
|
|
, requests
|
2018-10-16 23:00:18 +01:00
|
|
|
, tqdm
|
2019-04-19 17:44:36 +01:00
|
|
|
# Advanced image processing (triples size of output)
|
|
|
|
, advancedProcessing ? false
|
|
|
|
, opencv ? null
|
|
|
|
, scikitimage ? null
|
|
|
|
, scikitlearn ? null
|
|
|
|
, scipy ? null
|
|
|
|
, matplotlib ? null
|
|
|
|
, youtube-dl ? null
|
2018-10-16 23:00:18 +01:00
|
|
|
}:
|
|
|
|
|
2019-04-19 17:44:36 +01:00
|
|
|
assert advancedProcessing -> (
|
|
|
|
opencv != null && scikitimage != null && scikitlearn != null
|
|
|
|
&& scipy != null && matplotlib != null && youtube-dl != null);
|
|
|
|
|
2018-10-16 23:00:18 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moviepy";
|
2019-10-08 13:13:30 +01:00
|
|
|
version = "1.0.1";
|
2018-10-16 23:00:18 +01:00
|
|
|
|
2019-04-19 16:10:20 +01:00
|
|
|
disabled = !(pythonAtLeast "3.4");
|
|
|
|
|
2018-10-16 23:00:18 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-08 13:13:30 +01:00
|
|
|
sha256 = "1vgi9k1r4f5s9hzfzlhmmc574n80aq713ahv8cnbj3jci070lnwx";
|
2018-10-16 23:00:18 +01:00
|
|
|
};
|
|
|
|
|
2019-04-19 17:44:36 +01:00
|
|
|
# No tests, require network connection
|
2018-10-16 23:00:18 +01:00
|
|
|
doCheck = false;
|
2019-04-19 17:44:36 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy decorator imageio imageio-ffmpeg tqdm requests proglog
|
|
|
|
] ++ (stdenv.lib.optionals advancedProcessing [
|
|
|
|
opencv scikitimage scikitlearn scipy matplotlib youtube-dl
|
|
|
|
]);
|
2018-10-16 23:00:18 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Video editing with Python";
|
|
|
|
homepage = http://zulko.github.io/moviepy/;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|