<commit_before>{ stdenv, fetchFromGitHub, freetype, libX11, libXt, libXft
, version ? "2016-10-08"
, rev ? "a17c4a9c2a1af2de0a756fe16d482e0db88c0541"
, sha256 ? "03xmfzlijz4gbmr7l0pb1gl9kmlz1ab3hr8d51innvlasy4g6xgj"
}:

stdenv.mkDerivation rec {
  inherit version;
  name = "deadpixi-sam-unstable-${version}";
    src = fetchFromGitHub {
      inherit sha256 rev;
      owner = "deadpixi";
      repo = "sam";
    };

  postPatch = ''
    substituteInPlace config.mk.def \
      --replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2"
  '';

  makeFlags = [ "DESTDIR=$(out)" ];
  buildInputs = [ libX11 libXt libXft ];

  postInstall = ''
    mkdir -p $out/share/applications
    mv deadpixi-sam.desktop $out/share/applications
  '';

  meta = with stdenv.lib; {
    inherit (src.meta) homepage;
    description = "Updated version of the sam text editor";
    license = with licenses; lpl-102;
    maintainers = with maintainers; [ ramkromberg ];
    platforms = with platforms; linux;
  };
}<commit_msg>deadpixi-sam: fix on Darwin<commit_after>{ stdenv, fetchFromGitHub, freetype, libX11, libXt, libXft
, version ? "2016-10-08"
, rev ? "a17c4a9c2a1af2de0a756fe16d482e0db88c0541"
, sha256 ? "03xmfzlijz4gbmr7l0pb1gl9kmlz1ab3hr8d51innvlasy4g6xgj"
}:

stdenv.mkDerivation rec {
  inherit version;
  name = "deadpixi-sam-unstable-${version}";
    src = fetchFromGitHub {
      inherit sha256 rev;
      owner = "deadpixi";
      repo = "sam";
    };

  postPatch = ''
    substituteInPlace config.mk.def \
      --replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
      --replace "CC=gcc" ""
  '';

  CFLAGS = "-D_DARWIN_C_SOURCE";
  makeFlags = [ "DESTDIR=$(out)" ];
  buildInputs = [ libX11 libXt libXft ];

  postInstall = ''
    mkdir -p $out/share/applications
    mv deadpixi-sam.desktop $out/share/applications
  '';

  meta = with stdenv.lib; {
    inherit (src.meta) homepage;
    description = "Updated version of the sam text editor";
    license = with licenses; lpl-102;
    maintainers = with maintainers; [ ramkromberg ];
    platforms = with platforms; unix;
  };
}
{'fraction_non_alphanumeric': 0.13103122043519394, 'fraction_numerical': 0.05676442762535478, 'mean_word_length': 3.462025316455696, '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': '5930309', 'n_tokens_mistral': 873, 'n_tokens_neox': 809, 'n_words': 153}