3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/package-management/micromamba/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

88 lines
1.9 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cli11
, cmake
, curl
, ghc_filesystem
, libarchive
, libsolv
, libyamlcpp
, nlohmann_json
, python3
, reproc
, spdlog
, termcolor
, tl-expected
2021-07-04 19:28:28 +01:00
}:
let
libsolv' = libsolv.overrideAttrs (oldAttrs: {
cmakeFlags = oldAttrs.cmakeFlags ++ [
2021-08-22 20:19:47 +01:00
"-DENABLE_CONDA=true"
2021-07-04 19:28:28 +01:00
];
2021-08-22 20:19:47 +01:00
patches = [
# Apply the same patch as in the "official" boa-forge build:
# https://github.com/mamba-org/boa-forge/tree/master/libsolv
2021-08-22 20:19:47 +01:00
(fetchpatch {
2021-12-23 22:36:41 +00:00
url = "https://raw.githubusercontent.com/mamba-org/boa-forge/20530f80e2e15012078d058803b6e2c75ed54224/libsolv/conda_variant_priorization.patch";
2021-08-22 20:19:47 +01:00
sha256 = "1iic0yx7h8s662hi2jqx68w5kpyrab4fr017vxd4wyxb6wyk35dd";
})
2021-12-07 23:30:52 +00:00
];
2021-07-04 19:28:28 +01:00
});
spdlog' = spdlog.overrideAttrs (oldAttrs: {
# Required for header files. See alse:
# https://github.com/gabime/spdlog/pull/1241 (current solution)
# https://github.com/gabime/spdlog/issues/1897 (previous solution)
cmakeFlags = oldAttrs.cmakeFlags ++ [
"-DSPDLOG_FMT_EXTERNAL=OFF"
];
});
2021-07-04 19:28:28 +01:00
in
stdenv.mkDerivation rec {
pname = "micromamba";
version = "0.24.0";
2021-07-04 19:28:28 +01:00
src = fetchFromGitHub {
owner = "mamba-org";
repo = "mamba";
2022-05-18 19:16:21 +01:00
rev = "micromamba-" + version;
sha256 = "sha256-CszDmt3SElHo1D2sNy2tPhZ43YD3pDjT8+fp2PVk+7Y=";
2021-07-04 19:28:28 +01:00
};
nativeBuildInputs = [ cmake ];
buildInputs = [
cli11
nlohmann_json
curl
libarchive
2021-12-23 22:36:41 +00:00
libyamlcpp
2021-07-04 19:28:28 +01:00
libsolv'
reproc
spdlog'
2021-12-23 22:36:41 +00:00
termcolor
ghc_filesystem
python3
tl-expected
2021-07-04 19:28:28 +01:00
];
cmakeFlags = [
2021-12-23 22:36:41 +00:00
"-DBUILD_LIBMAMBA=ON"
"-DBUILD_SHARED=ON"
"-DBUILD_MICROMAMBA=ON"
# "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
2021-07-04 19:28:28 +01:00
];
meta = with lib; {
description = "Reimplementation of the conda package manager";
homepage = "https://github.com/mamba-org/mamba";
license = licenses.bsd3;
2022-06-24 13:01:02 +01:00
platforms = platforms.all;
2021-07-04 19:28:28 +01:00
maintainers = with maintainers; [ mausch ];
};
}