From ca2fa4416e59ec72323e8b1bec52b8403d239e8e Mon Sep 17 00:00:00 2001 From: Corbin Date: Sun, 25 Dec 2016 23:17:11 -0800 Subject: [PATCH] nginx: Allow GD to be optional. This commit permits incantations like `pkgs.nginx.override { gd = null; }` to produce a slimmed-down nginx. When used, this functionality removes a pile of stuff from nginx's closure. The resulting nginx's closure: $ nix-store -q -R /nix/store/wk3h0a4dmdmjmxkbd0q09iw0wfq0yzpz-nginx-1.10.2 | wc -l 12 $ nix-store -q -R /nix/store/gpcx77anqrj05qz0mrwm7hf4wgxry5py-nginx-1.10.2 | wc -l 24 --- pkgs/servers/http/nginx/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index b1d70907e28c..5d5a98ad8a8f 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -27,7 +27,6 @@ stdenv.mkDerivation { "--with-http_realip_module" "--with-http_addition_module" "--with-http_xslt_module" - "--with-http_image_filter_module" "--with-http_geoip_module" "--with-http_sub_module" "--with-http_dav_module" @@ -44,6 +43,7 @@ stdenv.mkDerivation { # Install destination problems # "--with-http_perl_module" ] ++ optional withStream "--with-stream" + ++ optional (gd != null) "--with-http_image_filter_module" ++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio" ++ map (mod: "--add-module=${mod.src}") modules;