<commit_before>x@{builderDefsPackage
  , jre
  , ...}:
builderDefsPackage
(a :
let
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
    ["jre"];

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
  sourceInfo = rec {
    baseName="welkin";
    version="1.1";
    name="${baseName}-${version}";
    url="http://simile.mit.edu/dist/welkin/${name}.tar.gz";
    hash="0hr2xvfz887fdf2ysiqydv6m13gbdl5x0fh4960i655d5imvd5x0";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["doDeploy" "createBin"];

  doDeploy = a.simplyShare "welkin";

  createBin = a.fullDepEntry ''
    mkdir -p "$out/bin"
    echo "#! ${a.stdenv.shell}" > "$out/bin/welkin"
    echo "export JAVA_HOME=${jre}" >> "$out/bin/welkin"
    echo "\"$out/share/welkin/welkin.sh\" \"\$@\"" >> "$out/bin/welkin"
    sed -e 's@[.]/lib/welkin[.]jar@"'"$out"'/share/welkin/lib/welkin.jar"@' -i "$out/share/welkin/welkin.sh"
    chmod a+x "$out/bin/welkin"
  '' ["minInit" "defEnsureDir"];

  meta = {
    description = "An RDF visualizer";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    hydraPlatforms = [];
    license = a.lib.licenses.free;
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://simile.mit.edu/dist/welkin/";
    };
  };
}) x<commit_msg>welkin: use mkDerivation and fix build<commit_after>{ stdenv, fetchsvn, jre, makeWrapper }:

stdenv.mkDerivation rec {
  name = "welkin-${version}";
  version = "1.1";

  src = fetchsvn {
    url = "http://simile.mit.edu/repository/welkin";
    rev = "9638";
    sha256 = "1bqh3vam7y805xrmdw7k0ckcfwjg88wypxgv3njkkwyn7kxnfnqp";
  };

  sourceRoot = "welkin-r9638/tags/${version}";

  buildInputs = [ jre makeWrapper ];

  installPhase = ''
    mkdir -p $out/{bin,share}
    cp -R . $out/share
    cp $out/share/welkin.sh $out/bin/welkin
    sed -e 's@\./lib/welkin\.jar@'"$out"'/share/lib/welkin.jar@' -i $out/bin/welkin
    wrapProgram $out/bin/welkin \
      --set JAVA_HOME ${jre}
    chmod a+x $out/bin/welkin
  '';

  meta = {
    description = "An RDF visualizer";
    maintainers = with stdenv.lib.maintainers; [
      raskin
    ];
    hydraPlatforms = [];
    license = stdenv.lib.licenses.free;
  };
}
{'fraction_non_alphanumeric': 0.1761292996270203, 'fraction_numerical': 0.021135515955242438, 'mean_word_length': 3.0435510887772192, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6186790', 'n_tokens_mistral': 1023, 'n_tokens_neox': 984, 'n_words': 159}