summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2013-09-25 13:18:27 +0200
committeraszlig <aszlig@redmoonstudios.org>2013-09-27 15:23:29 +0200
commitc9614d2d056172d5ee4b10dda16bf37e1ee32dbf (patch)
tree24874730f8a55c207c90420b41e3ddd5058e9405 /pkgs/servers/http
parent952d92346c11e35500ee721793419ca6fe8f1916 (diff)
downloadnixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.tar
nixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.tar.gz
nixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.tar.bz2
nixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.tar.lz
nixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.tar.xz
nixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.tar.zst
nixlib-c9614d2d056172d5ee4b10dda16bf37e1ee32dbf.zip
lighttpd: Allow to compile with magnet support.
This also adds pkgconfig to the dependency list so we don't need to
specify the path to OpenSSL anymore, because we need pkgconfig in order
to correctly find Lua anyway.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/lighttpd/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix
index f967a7aaa2a8..61070ef22b6e 100644
--- a/pkgs/servers/http/lighttpd/default.nix
+++ b/pkgs/servers/http/lighttpd/default.nix
@@ -1,4 +1,8 @@
-{ stdenv, fetchurl, pcre, libxml2, zlib, attr, bzip2, which, file, openssl }:
+{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file
+, openssl, enableMagnet ? false, lua5 ? null
+}:
+
+assert enableMagnet -> lua5 != null;
 
 stdenv.mkDerivation {
   name = "lighttpd-1.4.32";
@@ -8,9 +12,11 @@ stdenv.mkDerivation {
     sha256 = "1hgd9bi4mrak732h57na89lqg58b1kkchnddij9gawffd40ghs0k";
   };
 
-  buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ];
+  buildInputs = [ pkgconfig pcre libxml2 zlib attr bzip2 which file openssl ]
+             ++ stdenv.lib.optional enableMagnet lua5;
 
-  configureFlags = "--with-openssl --with-openssl-libs=${openssl}";
+  configureFlags = [ "--with-openssl" ]
+                ++ stdenv.lib.optional enableMagnet "--with-lua";
 
   preConfigure = ''
     sed -i "s:/usr/bin/file:${file}/bin/file:g" configure