<commit_before>{ 
  stdenv, fetchurl, docbook_xsl,
  docbook_xml_dtd_45, python, pygments, 
  libxslt 
}:

stdenv.mkDerivation rec {
  version = "6.12.0";
  name = "csound-manual-${version}";
  
  src = fetchurl {
    url = "https://github.com/csound/manual/archive/${version}.tar.gz";
    sha256 = "1v1scp468rnfbcajnp020kdj8zigimc2mbcwzxxqi8sf8paccdrp";
  };


  prePatch = ''
    substituteInPlace manual.xml \
      --replace "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
                "${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd"
  '';

  nativeBuildInputs = [ libxslt.bin ];

  buildInputs = [ docbook_xsl python pygments ];

  buildPhase = ''
    make XSL_BASE_PATH=${docbook_xsl}/share/xml/docbook-xsl html-dist
  '';

  installPhase = ''
    mkdir -p $out/share/doc/csound
    cp -r ./html $out/share/doc/csound
  '';

  meta = {
    description = "The Csound Canonical Reference Manual";
    homepage = "https://github.com/csound/manual";
    license = stdenv.lib.licenses.fdl12Plus;
    maintainers = [ stdenv.lib.maintainers.hlolli ];
    platforms = stdenv.lib.platforms.all;
  };
}
<commit_msg>fix: csound-manual by using newer git revision (#57663)<commit_after>{
  stdenv, fetchFromGitHub, docbook_xsl,
  docbook_xml_dtd_45, python, pygments,
  libxslt
}:

stdenv.mkDerivation rec {
  pname = "csound-manual";
  version = "unstable-2019-02-22";

  src = fetchFromGitHub {
    owner = "csound";
    repo = "manual";
    rev = "3b0bdc83f9245261b4b85a57c3ed636d5d924a4f";
    sha256 = "074byjhaxraapyg54dxgg7hi1d4978aa9c1rmyi50p970nsxnacn";
  };

  prePatch = ''
    substituteInPlace manual.xml \
      --replace "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
                "${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd"
  '';

  nativeBuildInputs = [ libxslt.bin ];

  buildInputs = [ docbook_xsl python pygments ];

  buildPhase = ''
    make XSL_BASE_PATH=${docbook_xsl}/share/xml/docbook-xsl html-dist
  '';

  installPhase = ''
    mkdir -p $out/share/doc/csound
    cp -r ./html $out/share/doc/csound
  '';

  meta = {
    description = "The Csound Canonical Reference Manual";
    homepage = "https://github.com/csound/manual";
    license = stdenv.lib.licenses.fdl12Plus;
    maintainers = [ stdenv.lib.maintainers.hlolli ];
    platforms = stdenv.lib.platforms.all;
  };
}
{'fraction_non_alphanumeric': 0.14163457424047926, 'fraction_numerical': 0.04022250748823278, 'mean_word_length': 3.1974865350089767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, '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': '6268664', 'n_tokens_mistral': 995, 'n_tokens_neox': 900, 'n_words': 129}