mamba-cpp: fix default paths

This commit is contained in:
Hythera
2026-05-22 11:09:29 +02:00
parent 39c7f28bb2
commit d12a8c71aa
+16 -1
View File
@@ -4,6 +4,7 @@
cmake,
lib,
libmamba,
makeWrapper,
msgpack-c,
nlohmann_json,
python3,
@@ -14,12 +15,19 @@
versionCheckHook,
yaml-cpp,
zstd,
# runtime options
defaultEnvPath ? "~/.mamba/envs",
defaultPkgPath ? "~/.mamba/pkgs",
defaultRootPath ? "~/.mamba",
}:
stdenv.mkDerivation {
pname = "mamba-cpp";
inherit (libmamba) version src;
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
makeWrapper
];
buildInputs = [
bzip2
@@ -43,6 +51,13 @@ stdenv.mkDerivation {
nativeInstallCheckInputs = [ versionCheckHook ];
postInstall = ''
wrapProgram $out/bin/mamba \
--set-default CONDA_ENVS_PATH '${defaultEnvPath}' \
--set-default CONDA_PKGS_DIRS '${defaultPkgPath}' \
--set-default MAMBA_ROOT_PREFIX '${defaultRootPath}'
'';
__structuredAttrs = true;
strictDeps = true;