anchor.diff:  
     meta = with stdenv.lib; {
       description = "Quantum chemistry and solid state physics program";
  -    homepage = https://www.cp2k.org;
  +    homepage = "https://www.cp2k.org";
       license = licenses.gpl3;
       maintainers = [ maintainters.markuskowa ];
  -    platforms = platforms.linux;
  +    platforms = [ "x86_64-linux" ];
     };
   }
   
  
positive.code: 
    cp2kVersion = "psmp";
    arch = "Linux-x86-64-gfortran";
  
    config = pkgs.writeText "cp2kConfig" ''
      CC         = gcc
      CPP        =
      FC         = mpif90
      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__MAX_CONTR=4
  
      FCFLAGS    = $(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
                   -ftree-vectorize -funroll-loops -msse2 \
                   ${stdenv.lib.optionalString optAVX "-mavx -mavx2"} \
                   -std=f2008 \
                   -I${libxc}/include -I${libxsmm}/include \
                   -I${libint2}/include \
                   -fopenmp -ftree-vectorize -funroll-loops
      LIBS       = -lfftw3 -lfftw3_threads -lfftw3_omp -lscalapack -lopenblas \
                   -lxcf03 -lxc -lxsmmf -lxsmm \
                   -lint2 -lstdc++ \
                   -fopenmp
    '';
  
  in stdenv.mkDerivation rec {
    name = "cp2k-${version}";
  
negative.code: { stdenv, fetchFromGitHub, python, gfortran, openblasCompat
  , fftw, libint2, libxc, mpi, gsl, scalapack, openssh, makeWrapper
  , libxsmm, which
  , optAVX ? false
  