<commit_before>{ nixpkgs ? (fetchTarball "channel:nixos-20.03")
}:

with nixpkgs;

let

  # Create an sdist given a derivation.
  # Should add an sdist and wheel output to buildPythonPackage
  create-sdist = drv:
    drv.overridePythonAttrs(oldAttrs: with oldAttrs; rec {
      name = "${pname}-${version}-sdist";

      postBuild = ''
        rm -rf dist
        ${drv.pythonModule.interpreter} nix_run_setup sdist

      '';

      installPhase = ''
        mkdir -p $out
        mv dist/*.tar.gz $out/
      '';

      fixupPhase = "true";
      doCheck = false;
      propagatedBuildInputs = [];
    });

  overrides = self: super: {
    acoustics = super.callPackage ./default.nix {
      development = true;
    };
  };

  overlay = self: super: {
    python36 = super.python36.override{packageOverrides=overrides;};
    python37 = super.python37.override{packageOverrides=overrides;};
  };

in import nixpkgs {
  overlays = [ overlay ];
}
<commit_msg>Allow building with python 3.8 using nix<commit_after>{ nixpkgs ? (fetchTarball "channel:nixos-20.03")
}:

with nixpkgs;

let

  # Create an sdist given a derivation.
  # Should add an sdist and wheel output to buildPythonPackage
  create-sdist = drv:
    drv.overridePythonAttrs(oldAttrs: with oldAttrs; rec {
      name = "${pname}-${version}-sdist";

      postBuild = ''
        rm -rf dist
        ${drv.pythonModule.interpreter} nix_run_setup sdist

      '';

      installPhase = ''
        mkdir -p $out
        mv dist/*.tar.gz $out/
      '';

      fixupPhase = "true";
      doCheck = false;
      propagatedBuildInputs = [];
    });

  overrides = self: super: {
    acoustics = super.callPackage ./default.nix {
      development = true;
    };
  };

  overlay = self: super: {
    python36 = super.python36.override{packageOverrides=overrides;};
    python37 = super.python37.override{packageOverrides=overrides;};
    python38 = super.python38.override{packageOverrides=overrides;};
  };

in import nixpkgs {
  overlays = [ overlay ];
}

{'fraction_non_alphanumeric': 0.12475149105367793, 'fraction_numerical': 0.014910536779324055, 'mean_word_length': 2.707182320441989, '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': '7265054', 'n_tokens_mistral': 697, 'n_tokens_neox': 669, 'n_words': 146}