1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, pythonAtLeast
5, numpy
6, decorator
7, imageio
8, imageio-ffmpeg
9, proglog
10, requests
11, tqdm
12# Advanced image processing (triples size of output)
13, advancedProcessing ? false
14, opencv3 ? null
15, scikitimage ? null
16, scikitlearn ? null
17, scipy ? null
18, matplotlib ? null
19, youtube-dl ? null
20}:
21
22assert advancedProcessing -> (
23 opencv3 != null && scikitimage != null && scikitlearn != null
24 && scipy != null && matplotlib != null && youtube-dl != null);
25
26buildPythonPackage rec {
27 pname = "moviepy";
28 version = "1.0.3";
29
30 disabled = !(pythonAtLeast "3.4");
31
32 src = fetchPypi {
33 inherit pname version;
34 sha256 = "2884e35d1788077db3ff89e763c5ba7bfddbd7ae9108c9bc809e7ba58fa433f5";
35 };
36
37 # No tests, require network connection
38 doCheck = false;
39
40 propagatedBuildInputs = [
41 numpy decorator imageio imageio-ffmpeg tqdm requests proglog
42 ] ++ (stdenv.lib.optionals advancedProcessing [
43 opencv3 scikitimage scikitlearn scipy matplotlib youtube-dl
44 ]);
45
46 meta = with stdenv.lib; {
47 description = "Video editing with Python";
48 homepage = "https://zulko.github.io/moviepy/";
49 license = licenses.mit;
50 };
51
52}