git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.moviepy: Add optional deps

Don't include them by default because they increase the derivation size from ~200M to over 600M.

commit64476e879b949764052b1ae1096aee1e259ca78b authorDaniel Schaefer <git@danielschaefer.me> dateFri 19 Apr 2019, 18:44 (8 years ago) parent2b4bc37
1 file changed+19−2
pkgs/development/python-modules/moviepy/default.nix+19−2
pkgs/development/python-modules/moviepy/default.nix+19−2
@@ -10,8 +10,20 @@
1010, proglog
1111, requests
1212, tqdm
13+# Advanced image processing (triples size of output)
14+, advancedProcessing ? false
15+, opencv ? null
16+, scikitimage ? null
17+, scikitlearn ? null
18+, scipy ? null
19+, matplotlib ? null
20+, youtube-dl ? null
1321}:
1422
23+assert advancedProcessing -> (
24+ opencv != null && scikitimage != null && scikitlearn != null
25+ && scipy != null && matplotlib != null && youtube-dl != null);
26+
1527buildPythonPackage rec {
1628 pname = "moviepy";
1729 version = "1.0.0";
@@ -23,9 +35,14 @@ buildPythonPackage rec {
2335 sha256 = "16c7ffca23d90c76dd7b163f648c8166dfd589b7c180b8ff75aa327ae0a2fc6d";
2436 };
2537
26− # No tests
38+ # No tests, require network connection
2739 doCheck = false;
28− propagatedBuildInputs = [ numpy decorator imageio imageio-ffmpeg tqdm requests proglog ];
40+
41+ propagatedBuildInputs = [
42+ numpy decorator imageio imageio-ffmpeg tqdm requests proglog
43+ ] ++ (stdenv.lib.optionals advancedProcessing [
44+ opencv scikitimage scikitlearn scipy matplotlib youtube-dl
45+ ]);
2946
3047 meta = with stdenv.lib; {
3148 description = "Video editing with Python";