2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
hostPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
# build dependencies
|
|
|
|
hatchling,
|
|
|
|
hatch-vcs,
|
|
|
|
# runtime dependencies
|
|
|
|
archspec,
|
|
|
|
conda-libmamba-solver,
|
|
|
|
conda-package-handling,
|
|
|
|
distro,
|
|
|
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "conda";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "24.4.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
owner = "conda";
|
|
|
|
repo = "conda";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-LdoBlR5EFYd2mQIjOgp1MH3w6osfRfurPq+N5Y1iaFw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
archspec
|
|
|
|
conda-libmamba-solver
|
|
|
|
conda-package-handling
|
|
|
|
distro
|
|
|
|
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" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# menuinst is currently not packaged
|
|
|
|
pythonRemoveDeps = lib.optionals (!hostPlatform.isWindows) [ "menuinst" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OS-agnostic, system-level binary package manager";
|
|
|
|
homepage = "https://github.com/conda/conda";
|
|
|
|
license = lib.licenses.bsd3;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ lib.maintainers.ericthemagician ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|