depot/third_party/nixpkgs/pkgs/development/python-modules/conda/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

83 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
hostPlatform,
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 {
pname = "conda";
version = "24.7.1";
pyproject = true;
src = fetchFromGitHub {
inherit pname version;
owner = "conda";
repo = "conda";
rev = "refs/tags/${version}";
hash = "sha256-e+C+tSUdSGyotuZzkOuV0e0hOj+MZRuq1fHzsu3LERQ=";
};
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 (!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 ];
};
}