<commit_before>args: with args; with stringsWithDeps; with lib;
let inherit (builtins) head tail trace; in
(rec
{
        inherit writeScript; 

        src = attrByPath ["src"] "" args;

        addSbinPath = attrByPath ["addSbinPath"] false args;

        forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"];
        forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL" 
          "README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++ 
          (optional (attrByPath ["forceCopyDoc"] true args) "doc"); 

        hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
        
        archiveType = s: 
                (if hasSuffixHack ".tar" s then "tar"
                else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz" 
                else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) || 
			(hasSuffixHack ".tbz" s) then "tbz2"
                else if (hasSuffixHack ".tar.Z" s) then "tZ" 
                else if (hasSuffixHack ".tar.lzma" s) then "tar.lzma"
                else if (hasSuffixHack ".tar.xz" s) then "tar.xz"
                else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip"
                else if (hasSuffixHack "-cvs-export" s) then "cvs-dir"
                else if (hasSuffixHack "-git-export" s) then "git-dir"
                else if (hasSuffixHack ".nar.bz2" s) then "narbz2"
                else if (hasSuffixHack ".rpm" s) then "rpm"

                # Mostly for manually specified directories..
                else if (hasSuffixHack "/" s) then "dir"

                # Last block - for single files!! It should be always after .tar.*
                else if (hasSuffixHack ".bz2" s) then "plain-bz2"
                else if (hasSuffixHack ".gz" s) then "plain-gz"

		# For bootstrap calls
		else if (s ==("" + (substring 0 0 s))) then "empty"

                else (abort "unknown archive type : ${s}"));

        # changing this ? see [1]
        defAddToSearchPath = fullDepEntry ("
                addToSearchPathWithCustomDelimiter() {
                        local delimiter=\$1
                        local varName=\$2
                        local needDir=\$3
                        local addDir=\${4:-\$needDir}
                        local prefix=\$5
                        if [ -d \$prefix\$needDir ]; then
                                if [ -z \${!varName} ]; then
                                        eval export \${varName}=\${prefix}\$addDir
                                else
                                        eval export \${varName}=\${!varName}\${delimiter}\${prefix}\$addDir
                                fi
                        fi
                }

                addToSearchPath()
                {
                        addToSearchPathWithCustomDelimiter \"\${PATH_DELIMITER}\" \"\$@\"
                }
        ") ["defNest"];

        # changing this ? see [1]
        defNest = noDepEntry ("
                nestingLevel=0

                startNest() {
                        nestingLevel=\$((\$nestingLevel + 1))
                                echo -en \"\\e[\$1p\"
                }

                stopNest() {
                        nestingLevel=\$((\$nestingLevel - 1))
                                echo -en \"\\e[q\"
                }

                header() {
                        startNest \"\$2\"
                                echo \"\$1\"
                }

                # Make sure that even when we exit abnormally, the original nesting
                # level is properly restored.
                closeNest() {
                        while test \$nestingLevel -gt 0; do
                                stopNest
                                        done
                }

                trap \"closeNest\" EXIT
        ");


        # changing this ? see [1]
        minInit = fullDepEntry ("
                set -e
                NIX_GCC=${stdenv.gcc}
                export SHELL=${stdenv.shell}
                PATH_DELIMITER=':'
        " + (if stdenv ? preHook && stdenv.preHook != null && toString stdenv.preHook != "" then 
                "
                param1=${stdenv.param1}
                param2=${stdenv.param2}
                param3=${stdenv.param3}
                param4=${stdenv.param4}
                param5=${stdenv.param5}
                source ${stdenv.preHook}
        " +         
                "
                # Set up the initial path.
                PATH=
                for i in \$NIX_GCC ${toString stdenv.initialPath}; do
                    PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin
                done

                export TZ=UTC

                prefix=${if args ? prefix then (toString args.prefix) else "\$out"}

                "
        else "")) ["defNest" "defAddToSearchPath"];
                
        # if you change this rewrite using '' instead of "" to get rid of indentation in builder scripts
        addInputs = fullDepEntry ("
                # Recursively find all build inputs.
                findInputs()
                {
                    local pkg=\$1

                    case \$pkgs in
                        *\\ \$pkg\\ *)
                            return 0
                            ;;
                    esac
                    
                    pkgs=\"\$pkgs \$pkg \"

                        echo \$pkg
                    if test -f \$pkg/nix-support/setup-hook; then
                        source \$pkg/nix-support/setup-hook
                    fi<commit_msg>* builderDefs: don't use param1-5.<commit_after>args: with args; with stringsWithDeps; with lib;
let inherit (builtins) head tail trace; in
(rec
{
        inherit writeScript; 

        src = attrByPath ["src"] "" args;

        addSbinPath = attrByPath ["addSbinPath"] false args;

        forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"];
        forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL" 
          "README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++ 
          (optional (attrByPath ["forceCopyDoc"] true args) "doc"); 

        hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
        
        archiveType = s: 
                (if hasSuffixHack ".tar" s then "tar"
                else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz" 
                else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) || 
			(hasSuffixHack ".tbz" s) then "tbz2"
                else if (hasSuffixHack ".tar.Z" s) then "tZ" 
                else if (hasSuffixHack ".tar.lzma" s) then "tar.lzma"
                else if (hasSuffixHack ".tar.xz" s) then "tar.xz"
                else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip"
                else if (hasSuffixHack "-cvs-export" s) then "cvs-dir"
                else if (hasSuffixHack "-git-export" s) then "git-dir"
                else if (hasSuffixHack ".nar.bz2" s) then "narbz2"
                else if (hasSuffixHack ".rpm" s) then "rpm"

                # Mostly for manually specified directories..
                else if (hasSuffixHack "/" s) then "dir"

                # Last block - for single files!! It should be always after .tar.*
                else if (hasSuffixHack ".bz2" s) then "plain-bz2"
                else if (hasSuffixHack ".gz" s) then "plain-gz"

		# For bootstrap calls
		else if (s ==("" + (substring 0 0 s))) then "empty"

                else (abort "unknown archive type : ${s}"));

        # changing this ? see [1]
        defAddToSearchPath = fullDepEntry ("
                addToSearchPathWithCustomDelimiter() {
                        local delimiter=\$1
                        local varName=\$2
                        local needDir=\$3
                        local addDir=\${4:-\$needDir}
                        local prefix=\$5
                        if [ -d \$prefix\$needDir ]; then
                                if [ -z \${!varName} ]; then
                                        eval export \${varName}=\${prefix}\$addDir
                                else
                                        eval export \${varName}=\${!varName}\${delimiter}\${prefix}\$addDir
                                fi
                        fi
                }

                addToSearchPath()
                {
                        addToSearchPathWithCustomDelimiter \"\${PATH_DELIMITER}\" \"\$@\"
                }
        ") ["defNest"];

        # changing this ? see [1]
        defNest = noDepEntry ("
                nestingLevel=0

                startNest() {
                        nestingLevel=\$((\$nestingLevel + 1))
                                echo -en \"\\e[\$1p\"
                }

                stopNest() {
                        nestingLevel=\$((\$nestingLevel - 1))
                                echo -en \"\\e[q\"
                }

                header() {
                        startNest \"\$2\"
                                echo \"\$1\"
                }

                # Make sure that even when we exit abnormally, the original nesting
                # level is properly restored.
                closeNest() {
                        while test \$nestingLevel -gt 0; do
                                stopNest
                                        done
                }

                trap \"closeNest\" EXIT
        ");


        # changing this ? see [1]
        minInit = fullDepEntry ("
                ${stdenv.preHook}
                
                set -e
                NIX_GCC=${stdenv.gcc}
                export SHELL=${stdenv.shell}
                PATH_DELIMITER=':'
                
                # Set up the initial path.
                PATH=
                for i in \$NIX_GCC ${toString stdenv.initialPath}; do
                    PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin
                done

                export TZ=UTC

                prefix=${if args ? prefix then (toString args.prefix) else "\$out"}

                ") ["defNest" "defAddToSearchPath"];
                
        # if you change this rewrite using '' instead of "" to get rid of indentation in builder scripts
        addInputs = fullDepEntry ("
                # Recursively find all build inputs.
                findInputs()
                {
                    local pkg=\$1

                    case \$pkgs in
                        *\\ \$pkg\\ *)
                            return 0
                            ;;
                    esac
                    
                    pkgs=\"\$pkgs \$pkg \"

                        echo \$pkg
                    if test -f \$pkg/nix-support/setup-hook; then
                        source \$pkg/nix-support/setup-hook
                    fi
{'fraction_non_alphanumeric': 0.11311595530316908, 'fraction_numerical': 0.006594614398241436, 'mean_word_length': 1.0837786259541984, '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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5556291', 'n_tokens_mistral': 3176, 'n_tokens_neox': 2837, 'n_words': 784}