@@ -1,7 +1,10 @@
1−{ stdenv, fetchurl, perl, ncurses, xlibsWrapper, bzip2, zlib, openssl
2−, spidermonkey_1_8_5, gpm
3−, enableGuile ? false, guile ? null # Incompatible licenses, LGPLv3 - GPLv2
4−, enablePython ? false, python ? null
1+{ stdenv, fetchurl, ncurses, xlibsWrapper, bzip2, zlib, openssl
2+, gpm
3+, # Incompatible licenses, LGPLv3 - GPLv2
4+ enableGuile ? false, guile ? null
5+, enablePython ? false, python ? null
6+, enablePerl ? (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null
7+, enableSpidermonkey ? (stdenv.hostPlatform == stdenv.buildPlatform), spidermonkey_1_8_5 ? null
58}:
69
710assert enableGuile -> guile != null;
@@ -17,28 +20,26 @@ stdenv.mkDerivation rec {
1720
1821 patches = [ ./gc-init.patch ];
1922
20− buildInputs = [ perl ncurses xlibsWrapper bzip2 zlib openssl spidermonkey_1_8_5 gpm ]
23+ buildInputs = [ ncurses xlibsWrapper bzip2 zlib openssl spidermonkey_1_8_5 gpm ]
2124 ++ stdenv.lib.optional enableGuile guile
22− ++ stdenv.lib.optional enablePython python;
23−
24− configureFlags =
25− ''
26− --enable-finger --enable-html-highlight
27− --with-perl --enable-gopher --enable-cgi --enable-bittorrent
28− --with-spidermonkey=${spidermonkey_1_8_5}
29− --enable-nntp --with-openssl=${openssl.dev}
30− '' + stdenv.lib.optionalString enableGuile " --with-guile"
31− + stdenv.lib.optionalString enablePython " --with-python";
32−
33− crossAttrs = {
34− propagatedBuildInputs = [ ncurses.crossDrv zlib.crossDrv openssl.crossDrv ];
35− configureFlags = ''
36− --enable-finger --enable-html-highlight
37− --enable-gopher --enable-cgi --enable-bittorrent --enable-nntp
38− --with-openssl=${openssl.crossDrv}
39− --with-bzip2=${bzip2.crossDrv}
40− '';
41− };
25+ ++ stdenv.lib.optional enablePython python
26+ ++ stdenv.lib.optional enablePerl perl
27+ ;
28+
29+ configureFlags = [
30+ "--enable-finger"
31+ "--enable-html-highlight"
32+ "--enable-gopher"
33+ "--enable-cgi"
34+ "--enable-bittorrent"
35+ "--enable-nntp"
36+ "--with-openssl=${openssl.dev}"
37+ "--with-bzip2=${bzip2.dev}"
38+ ] ++ stdenv.lib.optional enableGuile "--with-guile"
39+ ++ stdenv.lib.optional enablePython "--with-python"
40+ ++ stdenv.lib.optional enablePerl "--with-perl"
41+ ++ stdenv.lib.optional enableSpidermonkey "--with-spidermonkey=${spidermonkey_1_8_5}"
42+ ;
4243
4344 meta = {
4445 description = "Full-featured text-mode web browser";