summaryrefslogtreecommitdiff
path: root/Omni/Bild/Python.nix
blob: 36abe253556b199523885270e2bc715832c2794e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
_self: super: {
  python312 = super.python312.override {
    packageOverrides = pyself: pysuper:
      with pysuper.pkgs.python312Packages; let
        dontCheck = p: p.overridePythonAttrs (_: {doCheck = false;});
      in {
        interegular = callPackage ./Deps/interegular.nix {};
        ipython = dontCheck pysuper.ipython;
        llm = super.overrideSrc pysuper.llm super.sources.llm;
        llm-ollama = pysuper.pkgs.python312.pkgs.callPackage ./Deps/llm-ollama.nix {
          ollama = pyself.ollama;
        };
        llm-sentence-transformers = callPackage ./Deps/llm-sentence-transformers.nix {};
        ludic = callPackage ./Deps/ludic.nix {};
        mypy = dontCheck pysuper.mypy;
        ollama = pysuper.ollama.overridePythonAttrs (old: rec {
          dependencies = old.dependencies ++ [pysuper.pydantic];
          version = super.sources.ollama-python.version;
          src = super.sources.ollama-python;
          postPatch = ''
            substituteInPlace pyproject.toml \
              --replace-fail "0.0.0" "${version}"
          '';
        });
        openai = callPackage ./Deps/openai-python.nix {};
        outlines = callPackage ./Deps/outlines.nix {};
        perscache = callPackage ./Deps/perscache.nix {};
        tokenizers = dontCheck pysuper.tokenizers;
      };
  };

  python311 = super.python311.override {
    packageOverrides = _pyself: pysuper:
      with pysuper.pkgs.python311Packages; {
        llm-ollama = callPackage ./Deps/llm-ollama.nix {};
        llm-sentence-transformers =
          callPackage ./Deps/llm-sentence-transformers.nix {};
      };
  };
}