2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2023-02-02 18:25:31 +00:00
|
|
|
, bzip2
|
2022-07-14 12:49:19 +00:00
|
|
|
, cli11
|
|
|
|
, cmake
|
|
|
|
, curl
|
|
|
|
, ghc_filesystem
|
|
|
|
, libarchive
|
|
|
|
, libsolv
|
2023-02-02 18:25:31 +00:00
|
|
|
, yaml-cpp
|
2022-07-14 12:49:19 +00:00
|
|
|
, nlohmann_json
|
|
|
|
, python3
|
|
|
|
, reproc
|
|
|
|
, spdlog
|
|
|
|
, tl-expected
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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 = [
|
2022-07-14 12:49:19 +00:00
|
|
|
# Apply the same patch as in the "official" boa-forge build:
|
|
|
|
# https://github.com/mamba-org/boa-forge/tree/master/libsolv
|
2021-08-27 14:25:00 +00:00
|
|
|
(fetchpatch {
|
2022-01-03 16:56:52 +00:00
|
|
|
url = "https://raw.githubusercontent.com/mamba-org/boa-forge/20530f80e2e15012078d058803b6e2c75ed54224/libsolv/conda_variant_priorization.patch";
|
2021-08-27 14:25:00 +00:00
|
|
|
sha256 = "1iic0yx7h8s662hi2jqx68w5kpyrab4fr017vxd4wyxb6wyk35dd";
|
|
|
|
})
|
2021-12-19 01:06:50 +00:00
|
|
|
];
|
2021-07-14 22:03:04 +00:00
|
|
|
});
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "micromamba";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.5.8";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mamba-org";
|
|
|
|
repo = "mamba";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "micromamba-" + version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-sxZDlMFoMLq2EAzwBVO++xvU1C30JoIoZXEX/sqkXS0=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
bzip2
|
2021-07-14 22:03:04 +00:00
|
|
|
cli11
|
|
|
|
nlohmann_json
|
|
|
|
curl
|
|
|
|
libarchive
|
2023-02-02 18:25:31 +00:00
|
|
|
yaml-cpp
|
2021-07-14 22:03:04 +00:00
|
|
|
libsolv'
|
|
|
|
reproc
|
2023-04-12 12:48:02 +00:00
|
|
|
spdlog
|
2022-01-03 16:56:52 +00:00
|
|
|
ghc_filesystem
|
2022-07-14 12:49:19 +00:00
|
|
|
python3
|
|
|
|
tl-expected
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-01-03 16:56:52 +00:00
|
|
|
"-DBUILD_LIBMAMBA=ON"
|
|
|
|
"-DBUILD_SHARED=ON"
|
|
|
|
"-DBUILD_MICROMAMBA=ON"
|
|
|
|
# "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Reimplementation of the conda package manager";
|
|
|
|
homepage = "https://github.com/mamba-org/mamba";
|
|
|
|
license = licenses.bsd3;
|
2022-06-26 10:26:21 +00:00
|
|
|
platforms = platforms.all;
|
2021-07-14 22:03:04 +00:00
|
|
|
maintainers = with maintainers; [ mausch ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "micromamba";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
}
|