<commit_before>{stdenv, fetchurl, klibc, kernel, withKlibc ? true}:

stdenv.mkDerivation rec {
  name = "v86d-${version}-${kernel.version}";
  version = "0.1.10";

  src = fetchurl {
    url = "mirror://gentoo/distfiles//v86d-${version}.tar.bz2";
    sha256 = "0p3kwqjis941pns9948dxfnjnl5lwd8f2b6x794whs7g32p68jb3";
  };

  buildInputs = stdenv.lib.optional withKlibc klibc;

  configurePhase = ''
    bash ./configure $configureFlags
  '';

  configureFlags = if withKlibc then [ "--with-klibc" ] else [ "--default" ];

  makeFlags = [
    "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
    "DESTDIR=$(out)"
  ];

  meta = {
    description = "A userspace helper that runs x86 code in an emulated environment";
    homepage = http://dev.gentoo.org/~spock/projects/uvesafb/;
    license = stdenv.lib.licenses.gpl2;
    platforms = [ "i686-linux" "x86_64-linux" ];
  };
}
<commit_msg>v86d: refactor<commit_after>{ stdenv, fetchurl
, kernel, klibc
}:

stdenv.mkDerivation rec {
  name = "v86d-${version}-${kernel.version}";
  version = "0.1.10";

  src = fetchurl {
    url = "https://github.com/mjanusz/v86d/archive/v86d-${version}.tar.gz";
    sha256 = "1flnpp8rc945cxr6jr9dlm8mi8gr181zrp2say4269602s1a4ymg";
  };

  patchPhase = ''
    patchShebangs configure
  '';

  configureFlags = [ "--with-klibc" "--with-x86emu" ];

  makeFlags = [
    "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
    "DESTDIR=$(out)"
  ];

  configurePhase = ''
    ./configure $configureFlags
  '';

  buildInputs = [ klibc ];

  meta = with stdenv.lib; {
    description = "A daemon to run x86 code in an emulated environment";
    homepage = https://github.com/mjanusz/v86d;
    license = licenses.gpl2;
    maintainers = with maintainers; [ codyopel ];
    platforms = [ "i686-linux" "x86_64-linux" ];
  };
}
{'fraction_non_alphanumeric': 0.16282894736842105, 'fraction_numerical': 0.052083333333333336, 'mean_word_length': 3.451219512195122, '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': '3818242', 'n_tokens_mistral': 754, 'n_tokens_neox': 698, 'n_words': 113}