2016-01-17 23:04:40 +00:00
|
|
|
{ fetchcvs, stdenv, emacs, w3m, imagemagick, texinfo, autoreconfHook }:
|
2009-07-09 16:56:40 +01:00
|
|
|
|
2013-03-21 22:24:36 +00:00
|
|
|
let date = "2013-03-21"; in
|
2009-07-09 16:56:40 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2009-07-10 17:01:50 +01:00
|
|
|
name = "emacs-w3m-cvs${date}";
|
|
|
|
|
|
|
|
# Get the source from CVS because the previous release (1.4.4) is old and
|
|
|
|
# doesn't work with GNU Emacs 23.
|
|
|
|
src = fetchcvs {
|
|
|
|
inherit date;
|
|
|
|
cvsRoot = ":pserver:anonymous@cvs.namazu.org:/storage/cvsroot";
|
|
|
|
module = "emacs-w3m";
|
2013-03-21 22:24:36 +00:00
|
|
|
sha256 = "1lmcj8rf83w13q8q68hh7sa1abc2m6j2zmfska92xdp7hslhdgc5";
|
2009-07-09 16:56:40 +01:00
|
|
|
};
|
|
|
|
|
2016-01-17 23:04:40 +00:00
|
|
|
buildInputs = [ emacs w3m texinfo autoreconfHook ];
|
2009-07-09 16:56:40 +01:00
|
|
|
|
2009-07-09 17:09:09 +01:00
|
|
|
# XXX: Should we do the same for xpdf/evince, gv, gs, etc.?
|
2009-07-09 16:56:40 +01:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i "w3m.el" \
|
2009-07-09 17:09:09 +01:00
|
|
|
-e 's|defcustom w3m-command nil|defcustom w3m-command "${w3m}/bin/w3m"|g ;
|
|
|
|
s|(w3m-which-command "display")|"${imagemagick}/bin/display"|g'
|
|
|
|
|
|
|
|
sed -i "w3m-image.el" \
|
2009-07-11 11:30:48 +01:00
|
|
|
-e 's|(w3m-which-command "convert")|"${imagemagick}/bin/convert"|g ;
|
|
|
|
s|(w3m-which-command "identify")|"${imagemagick}/bin/identify"|g'
|
2009-07-09 16:56:40 +01:00
|
|
|
'';
|
|
|
|
|
2016-01-17 23:04:40 +00:00
|
|
|
configureFlags = [
|
2016-03-11 07:23:11 +00:00
|
|
|
"--with-lispdir=$(out)/share/emacs/site-lisp"
|
|
|
|
"--with-icondir=$(out)/share/emacs/site-lisp/images/w3m"
|
2016-01-17 23:04:40 +00:00
|
|
|
];
|
2009-07-09 16:56:40 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cd "$out/share/emacs/site-lisp"
|
|
|
|
for i in ChangeLog*
|
|
|
|
do
|
|
|
|
mv -v "$i" "w3m-$i"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Emacs-w3m, a simple Emacs interface to the w3m web browser";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Emacs/W3 used to be known as the most popular WEB browser on Emacs, but
|
|
|
|
it worked so slowly that we wanted a simple and speedy alternative.
|
|
|
|
|
|
|
|
w3m is a pager with WWW capability, developed by Akinori ITO. Although
|
|
|
|
it is a pager, it can be used as a text-mode WWW browser. Then we
|
|
|
|
developed a simple Emacs interface to w3m.
|
|
|
|
'';
|
|
|
|
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2009-07-09 16:56:40 +01:00
|
|
|
|
|
|
|
homepage = http://emacs-w3m.namazu.org/;
|
|
|
|
|
2014-01-28 16:24:00 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.mornfall ];
|
2009-07-09 16:56:40 +01:00
|
|
|
};
|
|
|
|
}
|