<commit_before># The releases of this project are apparently precompiled to .jar files.

{ stdenv, fetchurl, jre, runtimeShell }:

let

  version = "0.9";
  sha256 = "45dd668a9ceb9cd59529a9fefe422a002ee1554a61be07e6fc8b3baf33d733d9";

in stdenv.mkDerivation {
  name = "briss-${version}";
  src = fetchurl {
    url = "mirror://sourceforge/briss/briss-${version}.tar.gz";
    inherit sha256;
  };

  installPhase = ''
    mkdir -p "$out/bin";
    mkdir -p "$out/share";
    install -D -m444 -t "$out/share" *.jar
    echo "#!${runtimeShell}" > "$out/bin/briss"
    echo "${jre}/bin/java -Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\"" >> "$out/bin/briss"
    chmod +x "$out/bin/briss"
  '';

  meta = {
    homepage = https://sourceforge.net/projects/briss/;
    description = "Java application for cropping PDF files";
    license = stdenv.lib.licenses.gpl3;
    platforms = stdenv.lib.platforms.unix;
  };<commit_msg>briss: Use makeWrapper so it can take command-line args<commit_after># The releases of this project are apparently precompiled to .jar files.

{ stdenv, fetchurl, jre, makeWrapper }:

let

  version = "0.9";
  sha256 = "45dd668a9ceb9cd59529a9fefe422a002ee1554a61be07e6fc8b3baf33d733d9";

in stdenv.mkDerivation {
  name = "briss-${version}";
  src = fetchurl {
    url = "mirror://sourceforge/briss/briss-${version}.tar.gz";
    inherit sha256;
  };

  nativeBuildInputs = [makeWrapper];

  installPhase = ''
    mkdir -p "$out/bin";
    mkdir -p "$out/share";
    install -D -m444 -t "$out/share" *.jar
    makeWrapper "${jre}/bin/java" "$out/bin/briss" --add-flags "-Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\""
  '';

  meta = {
    homepage = https://sourceforge.net/projects/briss/;
    description = "Java application for cropping PDF files";
    license = stdenv.lib.licenses.gpl3;
    platforms = stdenv.lib.platforms.unix;
  };
{'fraction_non_alphanumeric': 0.1622464898595944, 'fraction_numerical': 0.05720228809152366, 'mean_word_length': 3.3529411764705883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '4424639', 'n_tokens_mistral': 802, 'n_tokens_neox': 729, 'n_words': 151}