anchor.diff:      ++ stdenv.lib.optional enableSpidermonkey "--with-spidermonkey=${spidermonkey}"
       ;
   
  -  meta = {
  +  meta = with stdenv.lib; {
       description = "Full-featured text-mode web browser";
       homepage = "http://elinks.or.cz";
  -    license = stdenv.lib.licenses.gpl2;
  -    platforms = stdenv.lib.platforms.linux;
  +    license = licenses.gpl2;
  +    platforms = with platforms; linux ++ darwin;
     };
   }
  
positive.code: { stdenv, fetchurl, ncurses, xlibsWrapper, bzip2, zlib, openssl
  , gpm
  , # Incompatible licenses, LGPLv3 - GPLv2
    enableGuile        ? false,                                         guile ? null
  
negative.code:     ./openssl-1.1.patch
    ];
  
    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
      ++ stdenv.lib.optional enableGuile guile
      ++ stdenv.lib.optional enablePython python
      ++ stdenv.lib.optional enablePerl perl
  