anchor.diff:  { stdenv, fetchgit, gfortran, perl, m4, llvm, gmp, pcre, blas, liblapack
    , readline, fftwSinglePrec, fftw, libunwind, suitesparse, glpk, fetchurl
  - , ncurses, libunistring, lighttpd
  + , ncurses, libunistring, lighttpd, patchelf
    } :
   let
     liblapackShared = liblapack.override{shared=true;};
  
positive.code:     sha256 = "e9d3e04bc984ec3b14033342f5ebdcd5202d8d8e40128dd737f566945612378f";
    };
    arpack_src = fetchurl {
      url = "http://forge.scilab.org/index.php/p/arpack-ng/downloads/353/get/";
      name = "arpack-ng-${arpack_ver}.tar.gz";
      sha256 = "4add769386e0f6b0484491bcff129c6f5234190dbf58e07cc068fbd5dc7278bf";
    };
    clp_src = fetchurl {
      url = "http://www.coin-or.org/download/source/Clp/Clp-${clp_ver}.tgz";
  
negative.code:     }
  
      for i in "${grisu_src}" "${dsfmt_src}" "${arpack_src}" "${clp_src}" "${lighttpd_src}" ; do
        copy_kill_hash "$i" deps
      done
      copy_kill_hash "${dsfmt_src}" deps/random
  
      sed -e '/cd SuiteSparse-SYSTEM/,+1s@find /lib /usr/lib /usr/local/lib@find ${suitesparse}/lib@' -i deps/Makefile
  
      ${if realGcc ==null then "" else 
      ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${realGcc}/lib -L${realGcc}/lib64 -lpcre -llapack -lm -lfftw3f -lfftw3 -lglpk -lunistring "''}
  
      sed -e 's@ cpp @ gcc -E @g' -i base/Makefile
  
      sed -e '1s@#! */bin/bash@#!${stdenv.shell}@' -i deps/*.sh
  
      export LDFLAGS="-L${suitesparse}/lib"
  
      mkdir -p "$out/lib"
      sed -e "s@/usr/local/lib@$out/lib@g" -i deps/Makefile
      sed -e "s@/usr/lib@$out/lib@g" -i deps/Makefile
      
      sed -e '/libumfpack.a/s@find @find ${suitesparse}/lib @' -i deps/Makefile
  
      export makeFlags="$makeFlags PREFIX=\"$out\" USR=\"$out\""
  
      sed -e 's@openblas@blas@' -i base/*.jl
  
      sed -e '/install -v julia-release-webserver/d' -i Makefile
  
      export dontPatchELF=1
    '';
  
    postInstall = ''
     ln -s "$out/share/julia/julia" "$out/bin"
  
     mkdir -p "$out/share/julia/ui/"
     cp -r ui/website "$out/share/julia/ui/"
     cp deps/lighttpd.conf "$out/share/julia/ui/"
  
     mkdir -p "$out/share/julia/ui/webserver/"
     cp -r ui/webserver/{*.jl,*.h} "$out/share/julia/ui/webserver/"
  
     echo -e '#!/bin/sh' >> "$out/bin/julia-webserver"
     echo -e "cd \"$out/share/julia\"" >> "$out/bin/julia-webserver"
     echo -e '${lighttpd}/sbin/lighttpd -D -f ./ui/lighttpd.conf &' >> "$out/bin/julia-webserver"
     echo -e '../../bin/julia-release-webserver -p 2001' >> "$out/bin/julia-webserver"
     chmod a+x "$out/bin/julia-webserver"
    '';
  
    meta = {
  