diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/browsers/elinks | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/browsers/elinks')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/browsers/elinks/default.nix | 50 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/networking/browsers/elinks/gc-init.patch | 17 |
2 files changed, 67 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/browsers/elinks/default.nix b/nixpkgs/pkgs/applications/networking/browsers/elinks/default.nix new file mode 100644 index 000000000000..b60454c4a42d --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/browsers/elinks/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, ncurses, xlibsWrapper, bzip2, zlib, openssl +, gpm +, # Incompatible licenses, LGPLv3 - GPLv2 + enableGuile ? false, guile ? null +, enablePython ? false, python ? null +, enablePerl ? (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null +, enableSpidermonkey ? (stdenv.hostPlatform == stdenv.buildPlatform), spidermonkey_1_8_5 ? null +}: + +assert enableGuile -> guile != null; +assert enablePython -> python != null; + +stdenv.mkDerivation rec { + name = "elinks-0.12pre6"; + + src = fetchurl { + url = http://elinks.or.cz/download/elinks-0.12pre6.tar.bz2; + sha256 = "1nnakbi01g7yd3zqwprchh5yp45br8086b0kbbpmnclabcvlcdiq"; + }; + + patches = [ ./gc-init.patch ]; + + buildInputs = [ ncurses xlibsWrapper bzip2 zlib openssl spidermonkey_1_8_5 gpm ] + ++ stdenv.lib.optional enableGuile guile + ++ 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" + ++ stdenv.lib.optional enableSpidermonkey "--with-spidermonkey=${spidermonkey_1_8_5}" + ; + + meta = { + description = "Full-featured text-mode web browser"; + homepage = http://elinks.or.cz; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/browsers/elinks/gc-init.patch b/nixpkgs/pkgs/applications/networking/browsers/elinks/gc-init.patch new file mode 100644 index 000000000000..de06f563d6e6 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/browsers/elinks/gc-init.patch @@ -0,0 +1,17 @@ +Fix libgc initialization in the presence of Guile 2.0. + +--- elinks-0.12pre5/src/main/main.c 2009-07-07 14:23:17.000000000 +0200 ++++ elinks-0.12pre5/src/main/main.c 2011-04-28 23:20:15.000000000 +0200 +@@ -339,6 +339,11 @@ int + main(int argc, char *argv[]) + { + #ifdef CONFIG_GC ++ /* Guile 2.x uses libgc too and it initializes it this way, so we ++ * must make sure to initialize it the same way, or it will just ++ * segfault. */ ++ GC_all_interior_pointers = 0; ++ + GC_INIT(); + GC_set_warn_proc(gc_warning); + #endif + |