From 2caabd37e1be75859507fe2226fe14860b0be3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 9 Jul 2009 15:56:40 +0000 Subject: [PATCH] Add Emacs-w3m, an Emacs interface to the W3M web browser. svn path=/nixpkgs/trunk/; revision=16287 --- .../editors/emacs-modes/emacs-w3m/default.nix | 49 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 53 insertions(+) create mode 100644 pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix diff --git a/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix b/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix new file mode 100644 index 000000000000..3a8e20d405d6 --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix @@ -0,0 +1,49 @@ +{ fetchurl, stdenv, emacs, w3m, texinfo }: + +stdenv.mkDerivation rec { + name = "emacs-w3m-1.4.4"; + + src = fetchurl { + url = "http://emacs-w3m.namazu.org/${name}.tar.gz"; + sha256 = "193p3kkjk1glhlgfqb9hz99av2i4b53civkz23ayvz3w9wvyird3"; + }; + + buildInputs = [ emacs w3m texinfo ]; + + patchPhase = '' + sed -i "w3m.el" \ + -e 's|defcustom w3m-command nil|defcustom w3m-command "${w3m}/bin/w3m"|g' + ''; + + configurePhase = '' + ./configure --prefix="$out" --with-lispdir="$out/share/emacs/site-lisp" \ + --with-icondir="$out/share/emacs/site-lisp/images/w3m" + ''; + + 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. + ''; + + license = "GPLv2+"; + + homepage = http://emacs-w3m.namazu.org/; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 67800b2dfc54..685fb98f718b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6233,6 +6233,10 @@ let # The forthcoming GNU Emacs 23 used to be referred to as `emacsUnicode' here. emacsUnicode = emacs23; + emacsw3m = import ../applications/editors/emacs-modes/emacs-w3m { + inherit fetchurl stdenv emacs w3m texinfo; + }; + emms = import ../applications/editors/emacs-modes/emms { inherit fetchurl stdenv emacs texinfo mpg321 vorbisTools taglib alsaUtils;