forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
62 lines
1.9 KiB
Nix
62 lines
1.9 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, xlibsWrapper, bzip2, zlib
|
|
, brotli, zstd, lzma, openssl, autoreconfHook, gettext, pkgconfig, libev
|
|
, gpm, libidn, tre, expat
|
|
, # Incompatible licenses, LGPLv3 - GPLv2
|
|
enableGuile ? false, guile ? null
|
|
, enablePython ? false, python ? null
|
|
, enablePerl ? (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null
|
|
# re-add javascript support when upstream supports modern spidermonkey
|
|
}:
|
|
|
|
assert enableGuile -> guile != null;
|
|
assert enablePython -> python != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "elinks";
|
|
version = "0.13.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rkd77";
|
|
repo = "felinks";
|
|
rev = "v${version}";
|
|
sha256 = "067l9m47j40039q8mvvnxd1amwrac3x6vv0c0svimfpvj4ammgkg";
|
|
};
|
|
|
|
buildInputs = [
|
|
ncurses xlibsWrapper bzip2 zlib brotli zstd lzma
|
|
openssl libidn tre expat libev
|
|
]
|
|
++ stdenv.lib.optional stdenv.isLinux gpm
|
|
++ stdenv.lib.optional enableGuile guile
|
|
++ stdenv.lib.optional enablePython python
|
|
++ stdenv.lib.optional enablePerl perl
|
|
;
|
|
|
|
nativeBuildInputs = [ autoreconfHook gettext pkgconfig ];
|
|
|
|
configureFlags = [
|
|
"--enable-finger"
|
|
"--enable-html-highlight"
|
|
"--enable-gopher"
|
|
"--enable-cgi"
|
|
"--enable-bittorrent"
|
|
"--enable-nntp"
|
|
"--enable-256-colors"
|
|
"--enable-true-color"
|
|
"--with-lzma"
|
|
"--with-libev"
|
|
"--with-terminfo"
|
|
] ++ stdenv.lib.optional enableGuile "--with-guile"
|
|
++ stdenv.lib.optional enablePython "--with-python"
|
|
++ stdenv.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";
|
|
license = licenses.gpl2;
|
|
platforms = with platforms; linux ++ darwin;
|
|
maintainers = with maintainers; [ iblech gebner ];
|
|
};
|
|
}
|