python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / package-management / micromamba / default.nix
blob305e996e0d713ec5fadc555a637731b95837fa51
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchpatch
5 , cli11
6 , cmake
7 , curl
8 , ghc_filesystem
9 , libarchive
10 , libsolv
11 , libyamlcpp
12 , nlohmann_json
13 , python3
14 , reproc
15 , spdlog
16 , termcolor
17 , tl-expected
20 let
21   libsolv' = libsolv.overrideAttrs (oldAttrs: {
22     cmakeFlags = oldAttrs.cmakeFlags ++ [
23       "-DENABLE_CONDA=true"
24     ];
26     patches = [
27       # Apply the same patch as in the "official" boa-forge build:
28       # https://github.com/mamba-org/boa-forge/tree/master/libsolv
29       (fetchpatch {
30         url = "https://raw.githubusercontent.com/mamba-org/boa-forge/20530f80e2e15012078d058803b6e2c75ed54224/libsolv/conda_variant_priorization.patch";
31         sha256 = "1iic0yx7h8s662hi2jqx68w5kpyrab4fr017vxd4wyxb6wyk35dd";
32       })
33     ];
34   });
36   spdlog' = spdlog.overrideAttrs (oldAttrs: {
37     # Required for header files. See alse:
38     # https://github.com/gabime/spdlog/pull/1241 (current solution)
39     # https://github.com/gabime/spdlog/issues/1897 (previous solution)
40     cmakeFlags = oldAttrs.cmakeFlags ++ [
41       "-DSPDLOG_FMT_EXTERNAL=OFF"
42     ];
43   });
45 stdenv.mkDerivation rec {
46   pname = "micromamba";
47   version = "0.25.0";
49   src = fetchFromGitHub {
50     owner = "mamba-org";
51     repo = "mamba";
52     rev = "micromamba-" + version;
53     sha256 = "sha256-aTScTM1jX1WIrAVkAvp37fMa+05teLJnVdyIwtYq7mY=";
54   };
56   nativeBuildInputs = [ cmake ];
58   buildInputs = [
59     cli11
60     nlohmann_json
61     curl
62     libarchive
63     libyamlcpp
64     libsolv'
65     reproc
66     spdlog'
67     termcolor
68     ghc_filesystem
69     python3
70     tl-expected
71   ];
73   cmakeFlags = [
74     "-DBUILD_LIBMAMBA=ON"
75     "-DBUILD_SHARED=ON"
76     "-DBUILD_MICROMAMBA=ON"
77     # "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
78   ];
80   meta = with lib; {
81     description = "Reimplementation of the conda package manager";
82     homepage = "https://github.com/mamba-org/mamba";
83     license = licenses.bsd3;
84     platforms = platforms.all;
85     maintainers = with maintainers; [ mausch ];
86   };