Re: [Nix-dev] fix for mlton

2012-03-13 Thread Ambrus Kaposi
On Tue, Mar 13, 2012 at 2:34 AM, Marc Weber marco-owe...@gmx.de wrote:
 The probblem was  substituteInPlace modifying the .tgz file. Don't ask
 me why it didn't happen in the past?

 Either find or substituteInPlace changed behaviour !?

I suspect a change in substituteInPlace which also rendered graphical
Java applications unusable on my setup by corrupting
/nix/store/ywxkvbvkqs2g2rwbi4wl8k29dafag27h-jdk-1.6.0_24/jre/lib/i386/xawt/libmawt.so:

$ ld 
/nix/store/ywxkvbvkqs2g2rwbi4wl8k29dafag27h-jdk-1.6.0_24/jre/lib/i386/xawt/libmawt.so
/nix/store/ywxkvbvkqs2g2rwbi4wl8k29dafag27h-jdk-1.6.0_24/jre/lib/i386/xawt/libmawt.so:
file not recognized: File format not recognized

The following patch repairs it:

Index: pkgs/development/compilers/jdk/dlj-bundle-builder.sh
===
--- pkgs/development/compilers/jdk/dlj-bundle-builder.sh(revision 33031)
+++ pkgs/development/compilers/jdk/dlj-bundle-builder.sh(working copy)
@@ -54,4 +54,4 @@
 ln -s $jrePath/lib/$architecture/libnpjp2.so $jrePath/lib/$architecture/plugins

 # Workaround for assertions in xlib, see
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373.
-substituteInPlace $jrePath/lib/*/xawt/libmawt.so --replace XINERAMA FAKEEXTN
+#substituteInPlace $jrePath/lib/*/xawt/libmawt.so --replace XINERAMA FAKEEXTN
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] fix for mlton

2012-03-12 Thread Marc Weber
diff --git a/pkgs/development/compilers/mlton/default.nix 
b/pkgs/development/compilers/mlton/default.nix
index c7217f8..8b42e70 100644
--- a/pkgs/development/compilers/mlton/default.nix
+++ b/pkgs/development/compilers/mlton/default.nix
@@ -30,9 +30,7 @@ stdenv.mkDerivation rec {
 
   configurePhase = ''
 # Fix paths in the source.
-for f in $(find $(pwd) -type f ) ; do
-  substituteInPlace $f --replace '/usr/bin/env bash' $(type -p bash)
-done
+find . -type f | grep -v -e '\.tgz''$' | xargs sed -i s@/usr/bin/env 
bash@$(type -p bash)@
 
 substituteInPlace $(pwd)/Makefile --replace '/bin/cp' $(type -p cp)
 
replacing the for each execute loop by sed also makes it a lot faster.
The probblem was  substituteInPlace modifying the .tgz file. Don't ask
me why it didn't happen in the past?

Either find or substituteInPlace changed behaviour !?

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev