<commit_before>{ pkgs, nodejs, extraNodePackages }:

let
  nodeEnv = import ../../../../development/node-packages/node-env.nix {
    inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
    inherit nodejs;
    libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
  };
in
  nodeEnv.buildNodePackage {
    name = "js-sequence-diagrams";
    packageName = "js-sequence-diagrams";
    version = "1000000.0.6";
    src = pkgs.fetchurl {
      url = "https://registry.npmjs.org/js-sequence-diagrams/-/js-sequence-diagrams-1000000.0.6.tgz";
      sha1 = "e95db01420479c5ccbc12046af1da42fde649e5c";
    };
    dependencies = [ ];
    dontNpmInstall = true;
    meta = {
      description = "Fucks NPM and draws simple SVG sequence diagrams from textual representation of the diagram";
      homepage = "https://github.com/Moeditor/js-sequence-diagrams#readme";
      license = "BSD-2-Clause";
    };
    production = true;
    bypassCache = true;

    postInstall = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (
      name: pkg: "ln -s ${pkg}/lib/node_modules/${name} $out/lib/node_modules/${name}"
    ) extraNodePackages);
  }<commit_msg>codimd: js-sequence-diagrams: use git source rather than the NPM tarball<commit_after>{ pkgs, nodejs, extraNodePackages }:

let
  nodeEnv = import ../../../../development/node-packages/node-env.nix {
    inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
    inherit nodejs;
    libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
  };
in
  nodeEnv.buildNodePackage {
    name = "js-sequence-diagrams";
    packageName = "js-sequence-diagrams";
    version = "1000000.0.6";
    src = pkgs.fetchFromGitHub {
      owner = "Moeditor";
      repo = "js-sequence-diagrams";
      rev = "4d46bc6229a3f93c9bcad561cab4924034f5456d";
      sha256 = "09ri5cx5yq87p3nla06gs0xb2gifmsy0xhs0s5524xr4ya6pnivv";
    };
    dependencies = [ ];
    dontNpmInstall = true;
    meta = {
      description = "Fucks NPM and draws simple SVG sequence diagrams from textual representation of the diagram";
      homepage = "https://github.com/Moeditor/js-sequence-diagrams#readme";
      license = "BSD-2-Clause";
    };
    production = true;
    bypassCache = true;

    postInstall = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (
      name: pkg: "ln -s ${pkg}/lib/node_modules/${name} $out/lib/node_modules/${name}"
    ) extraNodePackages);
  }
{'fraction_non_alphanumeric': 0.1296523517382413, 'fraction_numerical': 0.04171779141104295, 'mean_word_length': 3.2465277777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '7390271', 'n_tokens_mistral': 926, 'n_tokens_neox': 842, 'n_words': 165}