anchor.diff:        	cp -R ${ts}/. $out/ts
         	
         	chmod -R +w .
  -        
  +
  +
  +        # Patch shebangs in scripts to work with nix.        
           patchShebangs ./
   
   
  +        # Build everything
         	cd spoofax-deploy/org.metaborg.maven.build.strategoxt
         	mkdir strategoxt-distrib
         	cd strategoxt-distrib
  
positive.code:       	chmod a+x share/strategoxt/linux/*
        	cd $out
        
        	./spoofax-deploy/org.metaborg.maven.build.strategoxt/build.sh -e ${mavenEnv} -a "-Dmaven.repo.local=$out/.m2"
        	./spoofax-deploy/org.metaborg.maven.build.java/build.sh -e ${mavenEnv} -a "-Dmaven.repo.local=$out/.m2" -q ${spoofaxRev}
        	./spoofax-deploy/org.metaborg.maven.build.spoofax.eclipse/build.sh -e ${mavenEnv} -a "-Dmaven.repo.local=$out/.m2" -q ${spoofaxRev}
        	./spoofax-deploy/org.metaborg.maven.build.spoofax.libs/build.sh -e ${mavenEnv} -a "-Dmaven.repo.local=$out/.m2"
        	./spoofax-deploy/org.metaborg.maven.build.spoofax.sunshine/build.sh -e ${mavenEnv} -a "-Dmaven.repo.local=$out/.m2"
  
        
        	SPOOFAX_SITE_LOC="$out/spoofax-deploy/org.strategoxt.imp.updatesite/target/site"
        	SPOOFAX_SITE_FILE="$out/spoofax-eclipse-${spoofaxRev}.tar.gz"
          touch "''$SPOOFAX_SITE_LOC/index.html"
          tar cvzf ''$SPOOFAX_SITE_FILE ''$SPOOFAX_SITE_LOC
          
          SPOOFAX_LIBS_JAR="$out/spoofax-libs-${spoofaxRev}.jar"
          cp "$out/spoofax-deploy/org.metaborg.maven.build.spoofax.libs/target/org.metaborg.maven.build.spoofax.libs"*".jar" ''$SPOOFAX_LIBS_JAR
          
          SUNSHINE_JAR="$out/spoofax-sunshine-${spoofaxRev}.jar"
          cp "$out/spoofax-sunshine/org.spoofax.sunshine/target/org.metaborg.sunshine"*".jar" ''$SUNSHINE_JAR
          
          ensureDir $out/nix-support
          echo "file site ''$SPOOFAX_SITE_LOC" >> $out/nix-support/hydra-build-products
          echo "file tar ''$SPOOFAX_SITE_FILE" >> $out/nix-support/hydra-build-products
          echo "file jar ''$SPOOFAX_LIBS_JAR" >> $out/nix-support/hydra-build-products
          echo "file jar ''$SUNSHINE_JAR" >> $out/nix-support/hydra-build-products
        '';
        __noChroot = true;
      };
    };
  
negative.code: , mavenEnv  ? "\"-Xmx512m -Xms512m -Xss16m\""
  }:
  let
    pkgs = import nixpkgs { config.allowUnfree = true; };
    
    jobs = with pkgs.lib; {
      build = pkgs.stdenv.mkDerivation {
        name = "spoofax";
        
        buildInputs = with pkgs; [ stdenv git openjdk gnutar gzip bash maven3 wget unzip ant ];
        
        buildCommand = ''
          # Copy source code to build environment, and set write permissions.
          mkdir -p $out
          cd $out
          
        	cp -R ${aster}/. $out/aster
  