2018-10-17 00:00:18 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-04-19 17:10:20 +02:00
|
|
|
, pythonAtLeast
|
2018-10-17 00:00:18 +02:00
|
|
|
, numpy
|
|
|
|
, decorator
|
|
|
|
, imageio
|
2019-04-19 03:31:56 +02:00
|
|
|
, imageio-ffmpeg
|
2018-11-04 18:32:33 +01:00
|
|
|
, isPy3k
|
2019-04-19 03:31:56 +02:00
|
|
|
, proglog
|
|
|
|
, requests
|
2018-10-17 00:00:18 +02:00
|
|
|
, tqdm
|
2019-04-19 18:44:36 +02: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-17 00:00:18 +02:00
|
|
|
}:
|
|
|
|
|
2019-04-19 18:44:36 +02:00
|
|
|
assert advancedProcessing -> (
|
|
|
|
opencv != null && scikitimage != null && scikitlearn != null
|
|
|
|
&& scipy != null && matplotlib != null && youtube-dl != null);
|
|
|
|
|
2018-10-17 00:00:18 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moviepy";
|
2019-02-14 08:37:21 +01:00
|
|
|
version = "1.0.0";
|
2018-10-17 00:00:18 +02:00
|
|
|
|
2019-04-19 17:10:20 +02:00
|
|
|
disabled = !(pythonAtLeast "3.4");
|
|
|
|
|
2018-10-17 00:00:18 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 08:37:21 +01:00
|
|
|
sha256 = "16c7ffca23d90c76dd7b163f648c8166dfd589b7c180b8ff75aa327ae0a2fc6d";
|
2018-10-17 00:00:18 +02:00
|
|
|
};
|
|
|
|
|
2019-04-19 18:44:36 +02:00
|
|
|
# No tests, require network connection
|
2018-10-17 00:00:18 +02:00
|
|
|
doCheck = false;
|
2019-04-19 18:44:36 +02:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy decorator imageio imageio-ffmpeg tqdm requests proglog
|
|
|
|
] ++ (stdenv.lib.optionals advancedProcessing [
|
|
|
|
opencv scikitimage scikitlearn scipy matplotlib youtube-dl
|
|
|
|
]);
|
2018-10-17 00:00:18 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Video editing with Python";
|
|
|
|
homepage = http://zulko.github.io/moviepy/;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|