nixpkgs/pkgs/applications/networking/browsers/elinks/default.nix

62 lines
1.9 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, xlibsWrapper, bzip2, zlib
2021-03-14 18:12:53 +00:00
, brotli, zstd, xz, openssl, autoreconfHook, gettext, pkg-config, libev
2020-10-10 14:18:53 +00:00
, gpm, libidn, tre, expat
, # Incompatible licenses, LGPLv3 - GPLv2
enableGuile ? false, guile ? null
, enablePython ? false, python ? null
, enablePerl ? (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null
2020-10-10 14:18:53 +00:00
# re-add javascript support when upstream supports modern spidermonkey
}:
assert enableGuile -> guile != null;
assert enablePython -> python != null;
2020-06-26 21:59:28 +00:00
stdenv.mkDerivation rec {
2020-10-10 14:18:53 +00:00
pname = "elinks";
2021-01-18 15:31:47 +00:00
version = "0.14.0";
2020-10-10 14:18:53 +00:00
src = fetchFromGitHub {
owner = "rkd77";
repo = "felinks";
rev = "v${version}";
2021-01-18 15:31:47 +00:00
sha256 = "sha256-LxJJ0yBlw9hJ/agyL9dbVe4STKdXE8rtk1mMFqe1fFI=";
};
2020-10-10 14:18:53 +00:00
buildInputs = [
2021-03-14 18:12:53 +00:00
ncurses xlibsWrapper bzip2 zlib brotli zstd xz
2020-10-10 14:18:53 +00:00
openssl libidn tre expat libev
]
2021-01-15 13:21:58 +00:00
++ lib.optional stdenv.isLinux gpm
++ lib.optional enableGuile guile
++ lib.optional enablePython python
++ lib.optional enablePerl perl
;
nativeBuildInputs = [ autoreconfHook gettext pkg-config ];
configureFlags = [
"--enable-finger"
"--enable-html-highlight"
"--enable-gopher"
"--enable-cgi"
"--enable-bittorrent"
"--enable-nntp"
"--enable-256-colors"
2020-10-10 14:18:53 +00:00
"--enable-true-color"
"--with-lzma"
"--with-libev"
2020-10-10 14:18:53 +00:00
"--with-terminfo"
2021-01-15 13:21:58 +00:00
] ++ lib.optional enableGuile "--with-guile"
++ lib.optional enablePython "--with-python"
++ lib.optional enablePerl "--with-perl"
;
meta = with lib; {
description = "Full-featured text-mode web browser (package based on the fork felinks)";
homepage = "https://github.com/rkd77/felinks";
2020-06-26 21:59:28 +00:00
license = licenses.gpl2;
platforms = with platforms; linux ++ darwin;
2020-10-10 14:18:53 +00:00
maintainers = with maintainers; [ iblech gebner ];
};
}