anchor.diff: -{ lib, stdenv
  +{ lib
  +, stdenv
   , fetchurl
   , dimensions ? 6 # works for <= dimensions dimensions, but is only optimized for that exact value
   , doSymlink ? true # symlink the executables to the default location (without dimension postfix)
  
positive.code:   '';
  
    installPhase = ''
      mkdir -p "$out/bin"
      for file in poly class cws nef mori; do
          cp -p $file.x "$out/bin/$file-${dim}d.x"
      done
    '' + lib.optionalString doSymlink ''
      cd "$out/bin"
      for file in poly class cws nef mori; do
          ln -sf $file-6d.x $file.x
      done
    '';
  
  
negative.code:   '';
  
    preBuild = ''
      echo Building PALP optimized for ${dim} dimensions
      sed -i "s/^#define[^a-zA-Z]*POLY_Dmax.*/#define POLY_Dmax ${dim}/" Global.h
    '';
  
    # palp has no tests of its own. This test is an adapted sage test that failed
  