push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
diff --git i/conda/base/context.py w/conda/base/context.py
index adf6d6e89..82f2c77f9 100644
--- i/conda/base/context.py
+++ w/conda/base/context.py
@@ -832,7 +832,7 @@ class Context(Configuration):
@property
def conda_prefix(self) -> PathType:
- return abspath(sys.prefix)
+ return expand("~/.conda")
@property
@deprecated(
@@ -864,35 +864,20 @@ class Context(Configuration):
The vars can refer to each other if necessary since the dict is ordered.
None means unset it.
"""
- if context.dev:
- if pythonpath := os.environ.get("PYTHONPATH", ""):
- pythonpath = os.pathsep.join((CONDA_SOURCE_ROOT, pythonpath))
- else:
- pythonpath = CONDA_SOURCE_ROOT
- return {
- "CONDA_EXE": sys.executable,
- "_CONDA_EXE": sys.executable,
- # do not confuse with os.path.join, we are joining paths with ; or : delimiters
- "PYTHONPATH": pythonpath,
- "_CE_M": "-m",
- "_CE_CONDA": "conda",
- "CONDA_PYTHON_EXE": sys.executable,
- "_CONDA_ROOT": self.conda_prefix,
- }
- else:
- exe = os.path.join(
- self.conda_prefix,
- BIN_DIRECTORY,
- "conda.exe" if on_win else "conda",
- )
- return {
- "CONDA_EXE": exe,
- "_CONDA_EXE": exe,
- "_CE_M": None,
- "_CE_CONDA": None,
- "CONDA_PYTHON_EXE": sys.executable,
- "_CONDA_ROOT": self.conda_prefix,
- }
+ import sys
+ return {
+ "CONDA_EXE": sys.executable,
+ "_CONDA_EXE": sys.executable,
+ # do not confuse with os.path.join, we are joining paths with ; or : delimiters
+ "PYTHONPATH": os.pathsep.join(
+ [CONDA_SOURCE_ROOT, os.environ.get("PYTHONPATH", "")] + [path for path in sys.path if "site-packages" in path]
+ ),
+
+ "_CE_M": "-m",
+ "_CE_CONDA": "conda",
+ "CONDA_PYTHON_EXE": sys.executable,
+ "_CONDA_ROOT": self.conda_prefix,
+ }
@memoizedproperty
def channel_alias(self) -> Channel:

View File

@@ -0,0 +1,91 @@
{
lib,
buildPythonPackage,
stdenv,
fetchFromGitHub,
# build dependencies
hatchling,
hatch-vcs,
# runtime dependencies
archspec,
conda-libmamba-solver,
conda-package-handling,
distro,
frozendict,
jsonpatch,
packaging,
platformdirs,
pluggy,
pycosat,
requests,
ruamel-yaml,
tqdm,
truststore,
# runtime options
defaultEnvPath ? "~/.conda/envs", # default path to store conda environments
defaultPkgPath ? "~/.conda/pkgs", # default path to store download conda packages
}:
buildPythonPackage rec {
__structuredAttrs = true;
pname = "conda";
version = "25.7.0";
pyproject = true;
src = fetchFromGitHub {
inherit pname version;
owner = "conda";
repo = "conda";
tag = version;
hash = "sha256-lvqR1ksYE23enSf4pxFpb/Z8yPoU9bVb4Hi2ZrhI0XA=";
};
build-system = [
hatchling
hatch-vcs
];
dependencies = [
archspec
conda-libmamba-solver
conda-package-handling
distro
frozendict
jsonpatch
packaging
platformdirs
pluggy
pycosat
requests
ruamel-yaml
tqdm
truststore
];
patches = [ ./0001-conda_exe.patch ];
makeWrapperArgs = [
"--set"
"CONDA_EXE"
"${placeholder "out"}/bin/conda"
"--set-default"
"CONDA_ENVS_PATH"
defaultEnvPath
"--set-default"
"CONDA_PKGS_DIRS"
defaultPkgPath
];
pythonImportsCheck = [ "conda" ];
# menuinst is currently not packaged
pythonRemoveDeps = lib.optionals (!stdenv.hostPlatform.isWindows) [ "menuinst" ];
meta = {
description = "OS-agnostic, system-level binary package manager";
homepage = "https://github.com/conda/conda";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.ericthemagician ];
};
}