summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-03-23 21:31:30 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-03-23 21:31:30 +0000
commit1167cdd1badc504073dabcdf47bd86728c61e0a2 (patch)
tree713cefc1772120421a6403d1183e4df637584631
parent779b015a0358e04efce228cc5aad67ecc94a3333 (diff)
downloadnixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.tar
nixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.tar.gz
nixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.tar.bz2
nixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.tar.lz
nixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.tar.xz
nixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.tar.zst
nixlib-1167cdd1badc504073dabcdf47bd86728c61e0a2.zip
Adding plan9port with X11 support.
For acme to work, set the PLAN9 variable, and have the plan9port programs in the PATH.

svn path=/nixpkgs/trunk/; revision=14669
-rw-r--r--pkgs/tools/system/plan9port/builder.sh49
-rw-r--r--pkgs/tools/system/plan9port/default.nix21
-rw-r--r--pkgs/top-level/all-packages.nix5
3 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/tools/system/plan9port/builder.sh b/pkgs/tools/system/plan9port/builder.sh
new file mode 100644
index 000000000000..f33dc7227fba
--- /dev/null
+++ b/pkgs/tools/system/plan9port/builder.sh
@@ -0,0 +1,49 @@
+source $stdenv/setup
+
+tar xvfz $src
+
+cd plan9
+
+export PLAN9=`pwd`
+export X11=/tmp
+
+# Patch for the installation
+sed -i -e 's@`which echo`@echo@' lib/moveplan9.sh
+
+OLDPATH=$PATH
+PATH=`pwd`/bin:$PATH
+
+gcc lib/linux-isnptl.c -lpthread
+set +e 
+if ./a.out > /dev/null
+then
+  echo "SYSVERSION=2.6.x" >config
+else
+  echo "SYSVERSION=2.4.x" >config
+fi
+rm -f ./a.out
+set -e
+
+pushd src
+
+# Build mk
+../dist/buildmk 2>&1 | sed 's/^[+] //'
+
+# Build everything
+
+mk clean
+mk libs-nuke
+mk all || exit 1
+mk install || exit 1
+
+popd
+
+# Installation
+export PLAN9=$out
+ensureDir $PLAN9
+GLOBIGNORE='src:.*'
+cp -R * $PLAN9
+GLOBIGNORE=
+
+cd $PLAN9
+sh lib/moveplan9.sh `pwd`
diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix
new file mode 100644
index 000000000000..348121a10b80
--- /dev/null
+++ b/pkgs/tools/system/plan9port/default.nix
@@ -0,0 +1,21 @@
+{stdenv, fetchurl, libX11, xproto, libXt, xextproto}:
+
+stdenv.mkDerivation {
+  name = "plan9port-20090318";
+  
+  builder = ./builder.sh;
+
+  src = fetchurl {
+    #url = http://swtch.com/plan9port/plan9port-20090318.tgz;
+    url = file:///tmp/plan9port-20090318.tgz;
+    sha256 = "1idb2l1s5j34sa1dj1wwnvj97z5z7cy73qjafrxf2bbda26axzqj";
+  };
+
+  buildInputs = [ libX11 xproto libXt xextproto ];
+
+  meta = {
+    homepage = "http://swtch.com/plan9port/";
+    description = "Plan 9 from User Space";
+    license="free";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2405f9f93738..1a377a2e29da 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1088,6 +1088,11 @@ let
     inherit (gnome) glib gtk;
   };
 
+  plan9port = import ../tools/system/plan9port {
+    inherit fetchurl stdenv;
+    inherit (xlibs) libX11 xproto libXt xextproto;
+  };
+
   ploticus = import ../tools/graphics/ploticus {
     inherit fetchurl stdenv zlib libpng;
     inherit (xlibs) libX11;