<commit_before>{ lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, pkg-config, git
, bison, flex, postgresql, ripgrep, libunwind }:

stdenv.mkDerivation rec {
  pname = "stellar-core";
  version = "18.5.0";

  src = fetchFromGitHub {
    owner = "stellar";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-wEi22R4zb8d5CJV5eWb776Yob8B6Ok4FrbYI0SGM0H8=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ automake autoconf git libtool pkg-config ripgrep libunwind ];

  propagatedBuildInputs = [ bison flex postgresql ];

  enableParallelBuilding = true;

  preConfigure = ''
    # Due to https://github.com/NixOS/nixpkgs/issues/8567 we cannot rely on
    # having the .git directory present, so directly provide the version
    substituteInPlace src/Makefile.am --replace '$$vers' '${pname} ${version}';

    # Everything needs to be staged in git because the build uses
    # `git ls-files` to search for source files to compile.
    git init
    git add .
<commit_msg>Move libunwind to buildInputs<commit_after>{ lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, pkg-config, git
, bison, flex, postgresql, ripgrep, libunwind }:

stdenv.mkDerivation rec {
  pname = "stellar-core";
  version = "18.5.0";

  src = fetchFromGitHub {
    owner = "stellar";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-wEi22R4zb8d5CJV5eWb776Yob8B6Ok4FrbYI0SGM0H8=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ automake autoconf git libtool pkg-config ripgrep ];

  buildInputs = [ libunwind ];

  propagatedBuildInputs = [ bison flex postgresql ];

  enableParallelBuilding = true;

  preConfigure = ''
    # Due to https://github.com/NixOS/nixpkgs/issues/8567 we cannot rely on
    # having the .git directory present, so directly provide the version
    substituteInPlace src/Makefile.am --replace '$$vers' '${pname} ${version}';

    # Everything needs to be staged in git because the build uses
    # `git ls-files` to search for source files to compile.
    git init
    git add .

{'fraction_non_alphanumeric': 0.10686274509803921, 'fraction_numerical': 0.028431372549019607, 'mean_word_length': 3.6492027334851938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2271144', 'n_tokens_mistral': 749, 'n_tokens_neox': 703, 'n_words': 194}