<commit_before>{ stdenv, fetchurl, gfortran, openblas }:

let
  version = "4.4.1";
  name = "suitesparse-${version}";

  int_t = if openblas.blas64 then "int64_t" else "int32_t";
in
stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${version}.tar.gz";
    sha256 = "0y8i6dizrr556xggpjyc7wijjv4jbizhssmjj4jv8n1s7zxy2z0n";
  };

  preConfigure = ''
    mkdir -p $out/lib
    mkdir -p $out/include

    sed -i "SuiteSparse_config/SuiteSparse_config.mk" \
        -e 's/METIS .*$/METIS =/' \
        -e 's/METIS_PATH .*$/METIS_PATH =/' \
        -e '/CHOLMOD_CONFIG/ s/$/-DNPARTITION -DLONGBLAS=${int_t}/' \
        -e '/UMFPACK_CONFIG/ s/$/-DLONGBLAS=${int_t}/'
  '';

  makeFlags = [
    "PREFIX=\"$(out)\""
    "INSTALL_LIB=$(out)/lib"
    "INSTALL_INCLUDE=$(out)/include"
    "BLAS=-lopenblas"
    "LAPACK="
  ];

  NIX_CFLAGS = "-fPIC";

  postInstall = ''
    # Install documentation
    outdoc=$out/share/doc/${name}
    mkdir -p $outdoc
    cp -r AMD/Doc $outdoc/amd
    cp -r BTF/Doc $outdoc/bft<commit_msg>suitesparse_4_4: update to 4.4.4<commit_after>{ stdenv, fetchurl, gfortran, openblas }:

let
  version = "4.4.4";
  name = "suitesparse-${version}";

  int_t = if openblas.blas64 then "int64_t" else "int32_t";
in
stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${version}.tar.gz";
    sha256 = "1zdn1y0ij6amj7smmcslkqgbqv9yy5cwmbyzqc9v6drzdzllgbpj";
  };

  preConfigure = ''
    mkdir -p $out/lib
    mkdir -p $out/include

    sed -i "SuiteSparse_config/SuiteSparse_config.mk" \
        -e 's/METIS .*$/METIS =/' \
        -e 's/METIS_PATH .*$/METIS_PATH =/' \
        -e '/CHOLMOD_CONFIG/ s/$/-DNPARTITION -DLONGBLAS=${int_t}/' \
        -e '/UMFPACK_CONFIG/ s/$/-DLONGBLAS=${int_t}/'
  '';

  makeFlags = [
    "PREFIX=\"$(out)\""
    "INSTALL_LIB=$(out)/lib"
    "INSTALL_INCLUDE=$(out)/include"
    "BLAS=-lopenblas"
    "LAPACK="
  ];

  NIX_CFLAGS = "-fPIC";

  postInstall = ''
    # Install documentation
    outdoc=$out/share/doc/${name}
    mkdir -p $outdoc
    cp -r AMD/Doc $outdoc/amd
    cp -r BTF/Doc $outdoc/bft
{'fraction_non_alphanumeric': 0.17614929449248976, 'fraction_numerical': 0.023668639053254437, 'mean_word_length': 2.750853242320819, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '137464', 'n_tokens_mistral': 998, 'n_tokens_neox': 937, 'n_words': 148}