anchor.diff:      LD         = mpif90
       AR         = ar -r
       DFLAGS     = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \
  -                 -D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM \
  +                 -D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \
                    -D__MAX_CONTR=4
   
       FCFLAGS    = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
  
positive.code: { stdenv, fetchFromGitHub, python, gfortran, openblasCompat
  , fftw, libint2, libxc, mpi, gsl, scalapack, openssh, makeWrapper
  , libxsmm, which
  , optAVX ? false
  } :
  
  
negative.code:                  -I${libxc}/include -I${libxsmm}/include \
                   -I${libint2}/include
      LIBS       = -lfftw3 -lfftw3_threads -lscalapack -lopenblas \
                   -lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \
                   -lint2 -lstdc++ \
                   -fopenmp
      LDFLAGS    = \$(FCFLAGS) \$(LIBS)
      EOF
    '';
  
    checkPhase = ''
  