about summary refs log tree commit diff
path: root/pkgs/applications/editors/nedit
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2005-12-03 00:04:13 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2005-12-03 00:04:13 +0000
commit5da5239588987aea9e0f30e13e0dedc7cfbcd8bb (patch)
treeb85a3e9dd9e1a5a008e6d5b51ff3d01ec03b726c /pkgs/applications/editors/nedit
parentdb8da13e0d4289ea42466f1eb7b346687e39f7a1 (diff)
* Added NEdit.
svn path=/nixpkgs/trunk/; revision=4329
Diffstat (limited to 'pkgs/applications/editors/nedit')
-rw-r--r--pkgs/applications/editors/nedit/builder.sh11
-rw-r--r--pkgs/applications/editors/nedit/default.nix19
-rw-r--r--pkgs/applications/editors/nedit/dynamic.patch27
3 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/editors/nedit/builder.sh b/pkgs/applications/editors/nedit/builder.sh
new file mode 100644
index 0000000000000..a16ff3f32e92e
--- /dev/null
+++ b/pkgs/applications/editors/nedit/builder.sh
@@ -0,0 +1,11 @@
+source $stdenv/setup
+
+export NIX_CFLAGS_COMPILE="-DBUILD_UNTESTED_NEDIT -L$motif/lib $NIX_CFLAGS_COMPILE"
+
+installPhase=installPhase
+installPhase() {
+    ensureDir $out/bin
+    cp -p source/nedit source/nc $out/bin
+}
+
+genericBuild
diff --git a/pkgs/applications/editors/nedit/default.nix b/pkgs/applications/editors/nedit/default.nix
new file mode 100644
index 0000000000000..2a1fcb904890d
--- /dev/null
+++ b/pkgs/applications/editors/nedit/default.nix
@@ -0,0 +1,19 @@
+{stdenv, fetchurl, x11, motif, libXpm}:
+
+assert stdenv.system == "i686-linux";
+
+stdenv.mkDerivation {
+  name = "nedit-5.5";
+  builder = ./builder.sh;
+  
+  src = fetchurl {
+    url = http://nl.nedit.org/ftp/v5_5/nedit-5.5-src.tar.bz2;
+    md5 = "48cb3dce52d44988f3a4d7c6f47b6bbe";
+  };
+  patches = [./dynamic.patch];
+
+  inherit motif;
+  buildInputs = [x11 motif libXpm];
+
+  makeFlags = if stdenv.system == "i686-linux" then "linux" else "";
+}
diff --git a/pkgs/applications/editors/nedit/dynamic.patch b/pkgs/applications/editors/nedit/dynamic.patch
new file mode 100644
index 0000000000000..adb2cbc25927a
--- /dev/null
+++ b/pkgs/applications/editors/nedit/dynamic.patch
@@ -0,0 +1,27 @@
+diff -rc nedit-5.5-orig/makefiles/Makefile.linux nedit-5.5/makefiles/Makefile.linux
+*** nedit-5.5-orig/makefiles/Makefile.linux	2003-05-20 02:27:56.000000000 +0200
+--- nedit-5.5/makefiles/Makefile.linux	2005-12-03 00:42:23.000000000 +0100
+***************
+*** 17,27 ****
+  # To test if the Motif library exports the runtime version
+  # add -DHAVE__XMVERSIONSTRING to CFLAGS
+  #
+! CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
+  
+  ARFLAGS=-urs
+  
+! LIBS= -L/usr/X11R6/lib -Wl,-Bstatic -lXm -Wl,-Bdynamic -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm
+  
+  include Makefile.common
+  
+--- 17,27 ----
+  # To test if the Motif library exports the runtime version
+  # add -DHAVE__XMVERSIONSTRING to CFLAGS
+  #
+! CFLAGS=-O -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
+  
+  ARFLAGS=-urs
+  
+! LIBS= -lXm -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm
+  
+  include Makefile.common