summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/elinks/default.nix
blob: 1618042364e8cc91727731a996bb3093c5b18b0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ stdenv, fetchurl, python, perl, ncurses, x11, bzip2, zlib, openssl
, spidermonkey, gpm
, enableGuile ? true, guile ? null }:

assert enableGuile -> guile != null;

stdenv.mkDerivation rec {
  name = "elinks-0.12pre5";

  src = fetchurl {
    url = http://elinks.or.cz/download/elinks-0.12pre5.tar.bz2;
    sha256 = "1li4vlbq8wvnigxlkzb15490y90jg6y9yzzrqpqcz2h965w5869d";
  };

  patches = [ ./gc-init.patch ];

  buildInputs = [ python perl ncurses x11 bzip2 zlib openssl spidermonkey gpm ]
    ++ stdenv.lib.optional enableGuile guile;

  configureFlags =
    ''
      --enable-finger --enable-html-highlight
      --with-perl --with-python --enable-gopher --enable-cgi --enable-bittorrent
      --enable-nntp --with-openssl=${openssl}
    '' + stdenv.lib.optionalString enableGuile " --with-guile";

  crossAttrs = {
    propagatedBuildInputs = [ ncurses.crossDrv zlib.crossDrv openssl.crossDrv ];
    configureFlags = ''
      --enable-finger --enable-html-highlight
      --enable-gopher --enable-cgi --enable-bittorrent --enable-nntp
      --with-openssl=${openssl.crossDrv}
      --with-bzip2=${bzip2.crossDrv}
    '';
  };

  meta = {
    description = "Full-featured text-mode web browser";
    homepage = http://elinks.or.cz;
  };
}