anchor.diff:  
     patches = [ ./makefile.patch ];
   
  -  buildInputs = [glew mesa libpng x11 libXpm lesstif lynx freeglut libtiff rxp sablotron libXaw perl jdk ];
  +  buildInputs = [ glew mesa libpng libXpm lesstif lynx freeglut libtiff rxp sablotron libXaw perl jdk transfig libX11 libXext libXt gv xfig gnuplot ];
   
     unpackPhase = ''
       tar xzf $src
  
positive.code: 
    meta = {
      description     = "ARB software for sequence database handling and analysis";
      longDescription = ''The ARB software is a graphically oriented package comprising various tools for sequence database handling and data analysis. A central database of processed (aligned) sequences and any type of additional data linked to the respective sequence entries is structured according to phylogeny or other user defined criteria''; 
      license     = "non-free";
      pkgMaintainer = "Pjotr Prins";
      homepage    = http://www.arb-home.de/;
    };
  }
  
negative.code:   '';
  
    installPhase = ''
      ensureDir $out/lib
      shareddir=/nix/var/lib/arb
      # link out writable shared location lib/pts
      ensureDir $shareddir/lib/pts
      cp -vau lib/pts $shareddir/lib
      rm -vrf lib/pts
      ln -vs $shareddir/lib/pts $out/lib/pts
      chmod a+rwx -R $shareddir/lib/pts
      # link out writable shared location lib/nas/
      ensureDir $shareddir/lib/nas
      cp -vau lib/nas $shareddir/lib
      rm -vrf lib/nas
      ln -vs $shareddir/lib/nas $out/lib/nas
      chmod a+rwx -R $shareddir/lib/nas
      # link out shared lib/pixmaps (not sure about this, yet):
      ensureDir $shareddir/lib/pixmaps
      cp -vau lib/pixmaps $shareddir/lib
      rm -vrf lib/pixmaps
      ln -vs $shareddir/lib/pixmaps $out/lib/pixmaps
      chmod a+rwx -R $shareddir/lib/pixmaps
      # bulk copy
      cp -vau * $out
      # replace arb script
  