summary refs log tree commit diff
path: root/pkgs/tools/system/plan9port
diff options
context:
space:
mode:
authorRamakrishnan Muthukrishnan <vu3rdd@gmail.com>2014-04-15 07:54:36 +0530
committerRamakrishnan Muthukrishnan <vu3rdd@gmail.com>2014-04-15 18:37:18 +0530
commit38e81b5640f43fc5191a45d04d528bf8bf985541 (patch)
tree1918143146b110c723b06a6c768b91e84555c21f /pkgs/tools/system/plan9port
parent61cc18c55ff34c1df2360d3709c9cf87bc829be7 (diff)
downloadnixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.tar
nixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.tar.gz
nixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.tar.bz2
nixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.tar.lz
nixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.tar.xz
nixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.tar.zst
nixlib-38e81b5640f43fc5191a45d04d528bf8bf985541.zip
plan9port: modify the builder to use the INSTALL script.
plan9port ships with an INSTALL script. This commit modifies the
builder to use the script instead of a custom build script. The
commit also adds a patch to build fontsrv, which is otherwise
omitted from the build.
Diffstat (limited to 'pkgs/tools/system/plan9port')
-rw-r--r--pkgs/tools/system/plan9port/builder.sh46
-rw-r--r--pkgs/tools/system/plan9port/default.nix4
-rw-r--r--pkgs/tools/system/plan9port/fontsrv.patch14
3 files changed, 24 insertions, 40 deletions
diff --git a/pkgs/tools/system/plan9port/builder.sh b/pkgs/tools/system/plan9port/builder.sh
index bf5e6eeffa5a..729da7015d9a 100644
--- a/pkgs/tools/system/plan9port/builder.sh
+++ b/pkgs/tools/system/plan9port/builder.sh
@@ -4,46 +4,14 @@ tar xvfz $src
 
 cd plan9
 
-export PLAN9=`pwd`
-export X11=/tmp
+for p in $patches; do
+  echo "applying patch $p"
+  patch -p1 < $p
+done
 
-# Patch for the installation
-sed -i -e 's@`which echo`@echo@' lib/moveplan9.sh
+./INSTALL -b
+./INSTALL -r $out/plan9
 
-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
+export PLAN9=$out/plan9
 mkdir -p $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
index e5ec557a79a5..a6bc427178c1 100644
--- a/pkgs/tools/system/plan9port/default.nix
+++ b/pkgs/tools/system/plan9port/default.nix
@@ -2,7 +2,9 @@
 
 stdenv.mkDerivation rec {
   name = "plan9port-20140228";
-  
+
+  patches = [ ./fontsrv.patch ];
+
   builder = ./builder.sh;
 
   src = fetchurl {
diff --git a/pkgs/tools/system/plan9port/fontsrv.patch b/pkgs/tools/system/plan9port/fontsrv.patch
new file mode 100644
index 000000000000..49fd9c04231b
--- /dev/null
+++ b/pkgs/tools/system/plan9port/fontsrv.patch
@@ -0,0 +1,14 @@
+diff -r dc0640f14d07 src/cmd/mkfile
+--- a/src/cmd/mkfile	Tue Mar 25 23:23:10 2014 -0400
++++ b/src/cmd/mkfile	Mon Apr 14 22:36:05 2014 +0530
+@@ -4,8 +4,8 @@
+ 
+ <$PLAN9/src/mkmany
+ 
+-BUGGERED='CVS|faces|factotum|fontsrv|lp|ip|mailfs|upas|vncv|mnihongo|mpm|index|u9fs|secstore|smugfs|snarfer'
+-DIRS=lex `ls -l |sed -n 's/^d.* //p' |egrep -v "^($BUGGERED)$"|egrep -v '^lex$'` $FONTSRV
++BUGGERED='CVS|faces|factotum|lp|ip|mailfs|upas|vncv|mnihongo|mpm|index|u9fs|secstore|smugfs|snarfer'
++DIRS=lex `ls -l |sed -n 's/^d.* //p' |egrep -v "^($BUGGERED)$"|egrep -v '^lex$'`
+ 
+ <$PLAN9/src/mkdirs
+