<commit_before>{ stdenv, fetchurl
, gfortran, fftw, openblas
, mpi ? null
}:

stdenv.mkDerivation rec {
  version = "6.3";
  name = "quantum-espresso-${version}";

  src = fetchurl {
    url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
    sha256 = "1738z3nhkzcrgnhnfg1r4lipbwvcrcprwhzjbjysnylmzbzwhrs0";
  };

  passthru = {
    inherit mpi;
  };

  preConfigure = ''
    patchShebangs configure
  '';

  # remove after 6.3 version:
  # makefile needs to ignore install directory easier than applying patch
  preInstall = ''
    printf "\n.PHONY: install\n" >> Makefile
  '';

  buildInputs = [ fftw openblas gfortran ]
    ++ (stdenv.lib.optionals (mpi != null) [ mpi ]);

configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];

  makeFlags = [ "all" ];
<commit_msg>quantum-espresso: 6.3 -> 6.4<commit_after>{ stdenv, fetchurl
, gfortran, fftw, openblas
, mpi ? null
}:

stdenv.mkDerivation rec {
  version = "6.4";
  name = "quantum-espresso-${version}";

  src = fetchurl {
    url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
    sha256 = "1zjblzf0xzwmhmpjm56xvv8wsv5jmp5a204irzyicmd77p86c4vq";
  };

  passthru = {
    inherit mpi;
  };

  preConfigure = ''
    patchShebangs configure
  '';

  # remove after 6.4 version:
  # makefile needs to ignore install directory easier than applying patch
  preInstall = ''
    printf "\n.PHONY: install\n" >> Makefile
  '';

  buildInputs = [ fftw openblas gfortran ]
    ++ (stdenv.lib.optionals (mpi != null) [ mpi ]);

configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];

  makeFlags = [ "all" ];

{'fraction_non_alphanumeric': 0.16695652173913045, 'fraction_numerical': 0.02608695652173913, 'mean_word_length': 3.3585858585858586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3834461', 'n_tokens_mistral': 731, 'n_tokens_neox': 689, 'n_words': 128}