Unverified Commit 56f6828f authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.chromadb: fix build (#501899)

parents e71c32b3 fd0621d0
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -89,15 +89,21 @@ buildPythonPackage (finalAttrs: {
    hash = "sha256-H+kXxA/6rKzYA19v7Zlx2HbIg/DGicD5FDIs0noVGSk=";
  };

  postPatch = ''
  postPatch =
    # Nixpkgs is taking the version from `chromadb_rust_bindings` which is versioned independently
    ''
      substituteInPlace pyproject.toml \
        --replace-fail "dynamic = [\"version\"]" "version = \"${finalAttrs.version}\""

    ''
    # Flip anonymized telemetry to opt in versus current opt-in out for privacy
    + ''
      substituteInPlace chromadb/config.py \
        --replace-fail "anonymized_telemetry: bool = True" \
                       "anonymized_telemetry: bool = False"
    ''
    # error: queries overflow the depth limit!
    + ''
      sed -i '1i #![recursion_limit = "256"]' rust/segment/src/lib.rs
    '';

  pythonRelaxDeps = [