2021-08-27 14:25:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
|
2021-07-14 22:03:04 +00:00
|
|
|
, cli11, nlohmann_json, curl, libarchive, libyamlcpp, libsolv, reproc
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
libsolv' = libsolv.overrideAttrs (oldAttrs: {
|
|
|
|
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
2021-08-27 14:25:00 +00:00
|
|
|
"-DENABLE_CONDA=true"
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Patch added by the mamba team
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/mamba-org/boa-forge/f766da0cc18701c4d107a41de22417a65b53cc2d/libsolv/add_strict_repo_prio_rule.patch";
|
|
|
|
sha256 = "19c47i5cpyy88nxskf7k6q6r43i55w61jvnz7fc2r84hpjkcrv7r";
|
|
|
|
})
|
|
|
|
# Patch added by the mamba team
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/mamba-org/boa-forge/f766da0cc18701c4d107a41de22417a65b53cc2d/libsolv/conda_variant_priorization.patch";
|
|
|
|
sha256 = "1iic0yx7h8s662hi2jqx68w5kpyrab4fr017vxd4wyxb6wyk35dd";
|
|
|
|
})
|
|
|
|
# Patch added by the mamba team
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/mamba-org/boa-forge/f766da0cc18701c4d107a41de22417a65b53cc2d/libsolv/memcpy_to_memmove.patch";
|
|
|
|
sha256 = "1c9ir40l6crcxllj5zwhzbrbgibwqaizyykd0vip61gywlfzss64";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
# fails linking with yaml-cpp 0.7.x
|
|
|
|
libyamlcpp' = libyamlcpp.overrideAttrs (oldAttrs: rec {
|
|
|
|
|
|
|
|
version = "0.6.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbeder";
|
|
|
|
repo = "yaml-cpp";
|
|
|
|
rev = "yaml-cpp-${version}";
|
|
|
|
sha256 = "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s";
|
|
|
|
};
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/jbeder/yaml-cpp/commit/4f48727b365962e31451cd91027bd797bc7d2ee7.patch";
|
|
|
|
sha256 = "sha256-jarZAh7NgwL3xXzxijDiAQmC/EC2WYfNMkYHEIQBPhM=";
|
|
|
|
})
|
|
|
|
];
|
2021-07-14 22:03:04 +00:00
|
|
|
});
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "micromamba";
|
2021-08-27 14:25:00 +00:00
|
|
|
version = "0.15.0";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mamba-org";
|
|
|
|
repo = "mamba";
|
|
|
|
rev = version;
|
2021-08-27 14:25:00 +00:00
|
|
|
sha256 = "1zksp4zqj4wn9p9jb1qx1acajaz20k9xnm80yi7bab2d37y18hcw";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cli11
|
|
|
|
nlohmann_json
|
|
|
|
curl
|
|
|
|
libarchive
|
2021-08-27 14:25:00 +00:00
|
|
|
libyamlcpp'
|
2021-07-14 22:03:04 +00:00
|
|
|
libsolv'
|
|
|
|
reproc
|
|
|
|
# python3Packages.pybind11 # Would be necessary if someone wants to build with bindings I guess.
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_BINDINGS=OFF" # Fails to build, I don't think it's necessary for now.
|
|
|
|
"-DBUILD_EXE=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
CXXFLAGS = "-DMAMBA_USE_STD_FS";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Reimplementation of the conda package manager";
|
|
|
|
homepage = "https://github.com/mamba-org/mamba";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ mausch ];
|
|
|
|
};
|
|
|
|
}
|