2020-06-26 23:59:28 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch, ncurses, xlibsWrapper, bzip2, zlib, openssl
|
2017-09-05 19:11:27 +02:00
|
|
|
, gpm
|
|
|
|
, # Incompatible licenses, LGPLv3 - GPLv2
|
|
|
|
enableGuile ? false, guile ? null
|
|
|
|
, enablePython ? false, python ? null
|
|
|
|
, enablePerl ? (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null
|
2019-08-01 23:18:26 +02:00
|
|
|
, enableSpidermonkey ? (stdenv.hostPlatform == stdenv.buildPlatform), spidermonkey ? null
|
2014-01-20 09:27:27 +01:00
|
|
|
}:
|
2013-03-15 11:50:09 +01:00
|
|
|
|
|
|
|
assert enableGuile -> guile != null;
|
2014-01-20 09:27:27 +01:00
|
|
|
assert enablePython -> python != null;
|
2007-07-17 21:29:53 +02:00
|
|
|
|
2020-06-26 23:59:28 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "elinks";
|
|
|
|
version = "0.12pre6";
|
2007-07-17 21:29:53 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-06-26 23:59:28 +02:00
|
|
|
url = "http://elinks.or.cz/download/${pname}-${version}.tar.bz2";
|
2014-01-20 09:16:19 +01:00
|
|
|
sha256 = "1nnakbi01g7yd3zqwprchh5yp45br8086b0kbbpmnclabcvlcdiq";
|
2007-07-17 21:29:53 +02:00
|
|
|
};
|
|
|
|
|
2020-02-28 17:29:24 +01:00
|
|
|
patches = [
|
|
|
|
./gc-init.patch
|
|
|
|
./openssl-1.1.patch
|
|
|
|
];
|
2011-04-28 23:22:24 +02:00
|
|
|
|
2020-06-26 23:59:28 +02:00
|
|
|
postPatch = (stdenv.lib.optional stdenv.isDarwin) ''
|
|
|
|
patch -p0 < ${fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/macports/macports-ports/72bed7749e76b9092ddd8d9fe2d8449c5afb1d71/www/elinks/files/patch-perl.diff";
|
|
|
|
sha256 = "14q9hk3kg2n2r5b062hvrladp7b4yzysvhq07903w9kpg4zdbyqh";
|
|
|
|
}}
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ ncurses xlibsWrapper bzip2 zlib openssl spidermonkey ]
|
|
|
|
++ stdenv.lib.optional stdenv.isLinux gpm
|
2014-01-20 09:27:27 +01:00
|
|
|
++ stdenv.lib.optional enableGuile guile
|
2017-09-05 19:11:27 +02:00
|
|
|
++ stdenv.lib.optional enablePython python
|
|
|
|
++ stdenv.lib.optional enablePerl perl
|
|
|
|
;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-finger"
|
|
|
|
"--enable-html-highlight"
|
|
|
|
"--enable-gopher"
|
|
|
|
"--enable-cgi"
|
|
|
|
"--enable-bittorrent"
|
|
|
|
"--enable-nntp"
|
|
|
|
"--with-openssl=${openssl.dev}"
|
|
|
|
"--with-bzip2=${bzip2.dev}"
|
|
|
|
] ++ stdenv.lib.optional enableGuile "--with-guile"
|
|
|
|
++ stdenv.lib.optional enablePython "--with-python"
|
|
|
|
++ stdenv.lib.optional enablePerl "--with-perl"
|
2019-08-01 23:18:26 +02:00
|
|
|
++ stdenv.lib.optional enableSpidermonkey "--with-spidermonkey=${spidermonkey}"
|
2017-09-05 19:11:27 +02:00
|
|
|
;
|
2010-08-11 22:14:25 +02:00
|
|
|
|
2020-06-26 23:59:28 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-07-28 13:55:54 +02:00
|
|
|
description = "Full-featured text-mode web browser";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://elinks.or.cz";
|
2020-06-26 23:59:28 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2007-07-17 21:29:53 +02:00
|
|
|
};
|
|
|
|
}
|