<commit_before>args : 
let 
  lib = args.lib;
  fetchurl = args.fetchurl;
  fullDepEntry = args.fullDepEntry;

  version = lib.attrByPath ["version"] "9.4" args; 
  buildInputs = with args; [gtk glib pkgconfig 
     libXpm gmp gettext libX11 fftw]
      ++ (lib.optional (args ? ruby) args.ruby)
      ++ (lib.optional (args ? mesa) args.mesa)
      ++ (lib.optional (args ? guile) args.guile)
      ++ (lib.optional (args ? libtool) args.libtool)
      ++ (lib.optional (args ? sndlib) args.sndlib)
      ++ (lib.optional (args ? alsaLib) args.alsaLib)
      ++ (lib.optional (args ? jackaudio) args.jackaudio)
      ;
  configureFlags = ["--with-gtk" "--with-xpm"]
    ++ (lib.optional (args ? ruby)   "--with-ruby" )
    ++ (lib.optional (args ? mesa)   "--with-gl"   )
    ++ (lib.optional (args ? guile)  "--with-guile")
    ++ (lib.optional (args ? sndlib) "--with-midi" )
    ++ (lib.optional (args ? alsaLib)  "--with-alsa")
    ++ (lib.optional (args ? jackaudio) "--with-jack" )
    ++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
    ;
in
rec {
  src = fetchurl {
    url = "http://downloads.sourceforge.net/snd/snd-${version}.tar.gz";
    sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
  };

  inherit buildInputs;
  configureFlags = [];

  /* doConfigure should be specified separately */
  phaseNames = ["doConfigure" "preBuild" "makeDocsWork" 
    "doMakeInstall" "doForceShare"];

  makeDocsWork = fullDepEntry ''
                # hackish way to make html docs work
                h="$out/share/snd/html"; ensureDir "$h"; cp *.html "$h"
                patch -p1 < ${./doc.patch}
                sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
            '' ["defEnsureDir"];

  preBuild = fullDepEntry (''
                if [ -d /tmp ] && [ -w /tmp ]; then
		    cp -v config.log /tmp/snd-config.log
                fi
		export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
            '') ["minInit" "doUnpack" "makeDocsWork"];

  name = "Snd-" + version;
  meta = {
    description = "Snd sound editor.";
    homepage = http://ccrma.stanford.edu/software/snd;
    inherit src;
  };
}<commit_msg>Remove the debugging config copying. The actual expression hasn't changed for quite a while anyway<commit_after>args : 
let 
  lib = args.lib;
  fetchurl = args.fetchurl;
  fullDepEntry = args.fullDepEntry;

  version = lib.attrByPath ["version"] "9.4" args; 
  buildInputs = with args; [gtk glib pkgconfig 
     libXpm gmp gettext libX11 fftw]
      ++ (lib.optional (args ? ruby) args.ruby)
      ++ (lib.optional (args ? mesa) args.mesa)
      ++ (lib.optional (args ? guile) args.guile)
      ++ (lib.optional (args ? libtool) args.libtool)
      ++ (lib.optional (args ? sndlib) args.sndlib)
      ++ (lib.optional (args ? alsaLib) args.alsaLib)
      ++ (lib.optional (args ? jackaudio) args.jackaudio)
      ;
  configureFlags = ["--with-gtk" "--with-xpm"]
    ++ (lib.optional (args ? ruby)   "--with-ruby" )
    ++ (lib.optional (args ? mesa)   "--with-gl"   )
    ++ (lib.optional (args ? guile)  "--with-guile")
    ++ (lib.optional (args ? sndlib) "--with-midi" )
    ++ (lib.optional (args ? alsaLib)  "--with-alsa")
    ++ (lib.optional (args ? jackaudio) "--with-jack" )
    ++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
    ;
in
rec {
  src = fetchurl {
    url = "http://downloads.sourceforge.net/snd/snd-${version}.tar.gz";
    sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
  };

  inherit buildInputs;
  configureFlags = [];

  /* doConfigure should be specified separately */
  phaseNames = ["doConfigure" "preBuild" "makeDocsWork" 
    "doMakeInstall" "doForceShare"];

  makeDocsWork = fullDepEntry ''
                # hackish way to make html docs work
                h="$out/share/snd/html"; ensureDir "$h"; cp *.html "$h"
                patch -p1 < ${./doc.patch}
                sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
            '' ["defEnsureDir"];

  preBuild = fullDepEntry (''
		export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
            '') ["minInit" "doUnpack" "makeDocsWork"];

  name = "Snd-" + version;
  meta = {
    description = "Snd sound editor.";
    homepage = http://ccrma.stanford.edu/software/snd;
    inherit src;
  };
}
{'fraction_non_alphanumeric': 0.17085543002075168, 'fraction_numerical': 0.011528706479133042, 'mean_word_length': 2.561576354679803, 'pattern_counts': {'":': 0, '<': 5, '<?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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6331091', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1537, 'n_words': 323}