From 51bf90108f69f5c8512b41690f50e0781cc4ab4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Fri, 25 Apr 2008 16:13:36 +0000
Subject: [PATCH] Move GNU ed, add meta-information.

svn path=/nixpkgs/trunk/; revision=11715
---
 pkgs/applications/editors/ed/default.nix | 28 ++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix          |  8 +++----
 2 files changed, 32 insertions(+), 4 deletions(-)
 create mode 100644 pkgs/applications/editors/ed/default.nix

diff --git a/pkgs/applications/editors/ed/default.nix b/pkgs/applications/editors/ed/default.nix
new file mode 100644
index 000000000000..86914ab14e07
--- /dev/null
+++ b/pkgs/applications/editors/ed/default.nix
@@ -0,0 +1,28 @@
+{ fetchurl, stdenv }:
+
+stdenv.mkDerivation rec {
+  name = "ed-0.9";
+  src = fetchurl {
+    url = "mirror://gnu/ed/${name}.tar.bz2";
+    sha256 = "1xy746g7ai9gmv6iq2x1ll8x6wy4fi9anfh7gj5ifsdnaiahgyi2";
+  };
+
+  meta = {
+    description = "GNU ed, an implementation of the standard Unix stream editor";
+
+    longDescription = ''
+      GNU ed is a line-oriented text editor.  It is used to create,
+      display, modify and otherwise manipulate text files, both
+      interactively and via shell scripts.  A restricted version of ed,
+      red, can only edit files in the current directory and cannot
+      execute shell commands.  Ed is the "standard" text editor in the
+      sense that it is the original editor for Unix, and thus widely
+      available.  For most purposes, however, it is superseded by
+      full-screen editors such as GNU Emacs or GNU Moe.
+    '';
+
+    license = "GPLv3+";
+
+    homepage = http://www.gnu.org/software/ed/;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 26026dea2153..450e8d032fab 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -551,10 +551,6 @@ let pkgs = rec {
 
   dosfstools = dosfstoolsFun null;
 
-  ed = import ../tools/text/ed {
-    inherit fetchurl stdenv;
-  };
-
   enscript = import ../tools/text/enscript {
     inherit fetchurl stdenv;
   };
@@ -5119,6 +5115,10 @@ let pkgs = rec {
 
   eclipseSpoofax = lowPrio (appendToName "with-spoofax" (eclipse [spoofax]));
 
+  ed = import ../applications/editors/ed {
+    inherit fetchurl stdenv;
+  };
+
   elinks = import ../applications/networking/browsers/elinks {
     inherit stdenv fetchurl python perl ncurses x11 zlib openssl spidermonkey
       guile bzip2;