evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / minichain / default.nix
blob5109a0136bde830bffa591863015bea2ecafe558
2   buildPythonPackage,
3   eliot,
4   fetchPypi,
5   google-search-results,
6   jinja2,
7   lib,
8   manifest-ml,
9   openai,
10   pytestCheckHook,
11   pythonAtLeast,
14 buildPythonPackage rec {
15   pname = "minichain";
16   version = "0.3.3";
17   format = "setuptools";
19   # See https://github.com/NixOS/nixpkgs/pull/248195#issuecomment-1687398702.
20   disabled = pythonAtLeast "3.11";
22   # See https://github.com/srush/MiniChain/issues/23 and https://github.com/NixOS/nixpkgs/issues/248185 as to why we
23   # don't fetchFromGitHub.
24   src = fetchPypi {
25     inherit pname version;
26     hash = "sha256-+mju1Mz/aojROpiOVzv6WoRNTrhgCub4yyYLEWcHWh0=";
27   };
29   # See https://github.com/srush/MiniChain/issues/24.
30   postPatch = ''
31     substituteInPlace ./minichain/__init__.py --replace "from .gradio import GradioConf, show" ""
32   '';
35   pythonRemoveDeps = [
36     # Only used in the examples:
37     "datasets"
38     "faiss-cpu"
39     "jinja2-highlight"
40     "trio"
42     # Not used anywhere:
43     "eliot-tree"
45     # Not yet packaged in nixpkgs:
46     "gradio"
47   ];
49   # Some of these could be made optional. Certain packages are used by certain backends.
50   propagatedBuildInputs = [
51     eliot
52     google-search-results
53     jinja2
54     manifest-ml
55     openai
56   ];
58   # As of 0.3.3, the PyPI distribution does not include any tests.
59   doCheck = false;
61   pythonImportsCheck = [ "minichain" ];
63   nativeCheckInputs = [ pytestCheckHook ];
65   meta = with lib; {
66     description = "Tiny library for coding with large language models";
67     homepage = "https://srush-minichain.hf.space";
68     changelog = "https://github.com/srush/MiniChain/releases/tag/v${version}";
69     license = licenses.mit;
70     maintainers = with maintainers; [ samuela ];
71   };