<commit_before>{ lib, stdenv, fetchFromGitHub, autoreconfHook, jam, pkg-config
, zlib, libxml2, libxslt, xorgproto, libX11, libGLU, libGL, SDL
, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, physfs
}:

stdenv.mkDerivation {
  pname = "lincity-ng";
  version = "2.9beta.20170715";

  src = fetchFromGitHub {
    owner  = "lincity-ng";
    repo   = "lincity-ng";
    rev    = "0c19714b811225238f310633e59f428934185e6b";
    sha256 = "1gaj9fq97zmb0jsdw4rzrw34pimkmkwbfqps0glpqij4w3srz5f3";
  };

  hardeningDisable = [ "format" ];

  nativeBuildInputs = [
    autoreconfHook jam pkg-config
  ];

  buildInputs = [
    zlib libxml2 libxslt xorgproto libX11 libGLU libGL SDL SDL_mixer SDL_image
    SDL_ttf SDL_gfx physfs
  ];

  autoreconfPhase = ''
    ./autogen.sh
  '';

  buildPhase = ''
    runHook preBuild

    AR='ar r' jam -j $NIX_BUILD_CORES

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    touch CREDITS
    AR='ar r' jam install<commit_msg>lincity_ng: 2.9beta.20170715 -> 2.9beta.20211125<commit_after>{ stdenv
, SDL2
, SDL2_gfx
, SDL2_image
, SDL2_mixer
, SDL2_ttf
, autoreconfHook
, fetchFromGitHub
, jam
, lib
, libGL
, libGLU
, libX11
, libxml2
, libxslt
, physfs
, pkg-config
, xorgproto
, zlib
}:

stdenv.mkDerivation {
  pname = "lincity-ng";
  version = "2.9beta.20211125";

  src = fetchFromGitHub {
    owner = "lincity-ng";
    repo = "lincity-ng";
    rev = "b9062bec252632ca5d26b98d71453b8762c63173";
    sha256 = "0l07cn8rmpmlqdppjc2ikh5c7xmwib27504zpmn3n9pryp394r46";
  };

  hardeningDisable = [ "format" ];

  nativeBuildInputs = [
    autoreconfHook
    jam
    pkg-config
  ];

  buildInputs = [
    SDL2
    SDL2_gfx
    SDL2_image
    SDL2_mixer
    SDL2_ttf
    libGL
    libGLU
    libX11
    libxml2
    libxslt
    physfs
    xorgproto
    zlib
  ];

  autoreconfPhase = ''
    ./autogen.sh
  '';

  buildPhase = ''
    runHook preBuild

    AR='ar r' jam -j $NIX_BUILD_CORES

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    touch CREDITS
    AR='ar r' jam install
{'fraction_non_alphanumeric': 0.10200097608589556, 'fraction_numerical': 0.07906295754026355, 'mean_word_length': 3.0433925049309667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6115656', 'n_tokens_mistral': 974, 'n_tokens_neox': 859, 'n_words': 153}