<commit_before>class RustSrc < Formula
  desc "The Rust sources"
  homepage "https://www.rust-lang.org/downloads.html"
  url "https://static.rust-lang.org/dist/rustc-1.3.0-src.tar.gz"
  sha256 "ea02d7bc9e7de5b8be3fe6b37ea9b2bd823f9a532c8e4c47d02f37f24ffa3126"
  version "1.3.0"

  depends_on "rust"

  cxxstdlib_check :skip             # To ignore debug `.elf` and `.macho` files

  def install
    system "cp", "-a", "src/", "#{prefix}/src"

    plist_path.write <<-PLIST.undent
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>setenv.RUST_SRC_PATH</string>
        <key>ProgramArguments</key>
        <array>
          <string>/bin/launchctl</string>
          <string>setenv</string>
          <string>RUST_SRC_PATH</string>
          <string>#{prefix}/src</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
      </dict>
      </plist>
    PLIST
    plist_path.chmod 0644
  end

  def caveats
    <<-EOS.undent
      The launchctl plist is used to put the RUST_SRC_PATH environment
      variable in scope.
    EOS
  end
end
<commit_msg>More sensible "service" name for rust-src<commit_after>class RustSrc < Formula
  desc "The Rust sources"
  homepage "https://www.rust-lang.org/downloads.html"
  url "https://static.rust-lang.org/dist/rustc-1.3.0-src.tar.gz"
  sha256 "ea02d7bc9e7de5b8be3fe6b37ea9b2bd823f9a532c8e4c47d02f37f24ffa3126"
  version "1.3.0"

  depends_on "rust"

  cxxstdlib_check :skip             # To ignore debug `.elf` and `.macho` files

  def install
    system "cp", "-a", "src/", "#{prefix}/src"

    plist_path.write <<-PLIST.undent
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>homebrew.mxcl.rust-src</string>
        <key>ProgramArguments</key>
        <array>
          <string>/bin/launchctl</string>
          <string>setenv</string>
          <string>RUST_SRC_PATH</string>
          <string>#{prefix}/src</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
      </dict>
      </plist>
    PLIST
    plist_path.chmod 0644
  end

  def caveats
    <<-EOS.undent
      The launchctl plist is used to put the RUST_SRC_PATH environment
      variable in scope.
    EOS
  end
end

{'fraction_non_alphanumeric': 0.14380358534684334, 'fraction_numerical': 0.043647700701480906, 'mean_word_length': 2.3122580645161293, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 2, '>': 53, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5577386', 'n_tokens_mistral': 1020, 'n_tokens_neox': 939, 'n_words': 173}