<commit_before>{ lib, stdenv, asciidoctor
, caddy
, linkchecker
, callPackage
, pkgs }:

stdenv.mkDerivation rec {
  preferLocalBuild = true;
  allowSubstitutes = false;

  name    = "styx-${version}";
  version = builtins.unsafeDiscardStringContext (lib.fileContents ./VERSION);

  src = lib.cleanSource ./.;

  server = "${caddy}/bin/caddy";
  linkcheck = "${linkchecker}/bin/linkchecker";
  nixpkgs = pkgs.path;

  nativeBuildInputs = [ asciidoctor ];

  outputs = [ "out" "themes" ];

  installPhase = ''
    mkdir $out
    install -D -m 777 src/styx.sh $out/bin/styx

    cp src/default.nix $out/default.nix
    cp src/styx-config.nix $out/styx-config.nix

    mkdir -p $out/share/doc/styx
    asciidoctor src/doc/index.adoc       -o $out/share/doc/styx/index.html
    asciidoctor src/doc/styx-themes.adoc -o $out/share/doc/styx/styx-themes.html
    asciidoctor src/doc/library.adoc     -o $out/share/doc/styx/library.html
    cp -r src/doc/highlight $out/share/doc/styx/
    cp -r src/doc/imgs $out/share/doc/styx/

    substituteAllInPlace $out/bin/styx
    substituteAllInPlace $out/share/doc/styx/index.html
    substituteAllInPlace $out/share/doc/styx/styx-themes.html
    substituteAllInPlace $out/share/doc/styx/library.html

    mkdir -p $out/share/styx/scaffold
    cp -r src/scaffold $out/share/styx
    cp -r src/tools    $out/share/styx
    cp -r src/nix      $out/share/styx

    mkdir -p $out/lib
    cp -r src/lib/* $out/lib

    mkdir $themes
    cp -r themes/* $themes
  '';

  meta = with lib; {
    description = "Nix based static site generator";
    maintainers = with maintainers; [ ericsagnes ];
    platforms   = platforms.all;
  };
}<commit_msg>link source in /share/styx-src in install phase<commit_after>{ lib, stdenv, asciidoctor
, caddy
, linkchecker
, callPackage
, pkgs }:

stdenv.mkDerivation rec {
  preferLocalBuild = true;
  allowSubstitutes = false;

  name    = "styx-${version}";
  version = builtins.unsafeDiscardStringContext (lib.fileContents ./VERSION);

  src = lib.cleanSource ./.;

  server = "${caddy}/bin/caddy";
  linkcheck = "${linkchecker}/bin/linkchecker";
  nixpkgs = pkgs.path;

  nativeBuildInputs = [ asciidoctor ];

  outputs = [ "out" "themes" ];

  installPhase = ''
    mkdir $out
    install -D -m 777 src/styx.sh $out/bin/styx

    cp src/default.nix $out/default.nix
    cp src/styx-config.nix $out/styx-config.nix

    mkdir -p $out/share/doc/styx
    asciidoctor src/doc/index.adoc       -o $out/share/doc/styx/index.html
    asciidoctor src/doc/styx-themes.adoc -o $out/share/doc/styx/styx-themes.html
    asciidoctor src/doc/library.adoc     -o $out/share/doc/styx/library.html
    cp -r src/doc/highlight $out/share/doc/styx/
    cp -r src/doc/imgs $out/share/doc/styx/

    substituteAllInPlace $out/bin/styx
    substituteAllInPlace $out/share/doc/styx/index.html
    substituteAllInPlace $out/share/doc/styx/styx-themes.html
    substituteAllInPlace $out/share/doc/styx/library.html

    mkdir -p $out/share/styx/scaffold
    cp -r src/scaffold $out/share/styx
    cp -r src/tools    $out/share/styx
    cp -r src/nix      $out/share/styx

    mkdir -p $out/lib
    cp -r src/lib/* $out/lib

    mkdir $themes
    cp -r themes/* $themes

    ln -sT $src $out/share/styx-src
  '';

  meta = with lib; {
    description = "Nix based static site generator";
    maintainers = with maintainers; [ ericsagnes ];
    platforms   = platforms.all;
  };
}
{'fraction_non_alphanumeric': 0.13475591932183573, 'fraction_numerical': 0.0017538731365097924, 'mean_word_length': 2.7895902547065337, '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': '5849997', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1264, 'n_words': 254}