Merge pull request #151921 from mausch/micromamba

micromamba: 0.15.0 -> 0.18.1

authored by Renaud and committed by GitHub 61d24cba 46056f6c

+20 -36
+20 -36
pkgs/tools/package-management/micromamba/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake 2 - , cli11, nlohmann_json, curl, libarchive, libyamlcpp, libsolv, reproc 2 + , cli11, nlohmann_json, curl, libarchive, libyamlcpp, libsolv, reproc, spdlog, termcolor, ghc_filesystem 3 3 }: 4 4 5 5 let ··· 11 11 patches = [ 12 12 # Patch added by the mamba team 13 13 (fetchpatch { 14 - url = "https://raw.githubusercontent.com/mamba-org/boa-forge/f766da0cc18701c4d107a41de22417a65b53cc2d/libsolv/add_strict_repo_prio_rule.patch"; 14 + url = "https://raw.githubusercontent.com/mamba-org/boa-forge/20530f80e2e15012078d058803b6e2c75ed54224/libsolv/add_strict_repo_prio_rule.patch"; 15 15 sha256 = "19c47i5cpyy88nxskf7k6q6r43i55w61jvnz7fc2r84hpjkcrv7r"; 16 16 }) 17 17 # Patch added by the mamba team 18 18 (fetchpatch { 19 - url = "https://raw.githubusercontent.com/mamba-org/boa-forge/f766da0cc18701c4d107a41de22417a65b53cc2d/libsolv/conda_variant_priorization.patch"; 19 + url = "https://raw.githubusercontent.com/mamba-org/boa-forge/20530f80e2e15012078d058803b6e2c75ed54224/libsolv/conda_variant_priorization.patch"; 20 20 sha256 = "1iic0yx7h8s662hi2jqx68w5kpyrab4fr017vxd4wyxb6wyk35dd"; 21 21 }) 22 - # Patch added by the mamba team 23 - (fetchpatch { 24 - url = "https://raw.githubusercontent.com/mamba-org/boa-forge/f766da0cc18701c4d107a41de22417a65b53cc2d/libsolv/memcpy_to_memmove.patch"; 25 - sha256 = "1c9ir40l6crcxllj5zwhzbrbgibwqaizyykd0vip61gywlfzss64"; 26 - }) 27 - ]; 28 - }); 29 - 30 - # fails linking with yaml-cpp 0.7.x 31 - libyamlcpp' = libyamlcpp.overrideAttrs (oldAttrs: rec { 32 - 33 - version = "0.6.3"; 34 - 35 - src = fetchFromGitHub { 36 - owner = "jbeder"; 37 - repo = "yaml-cpp"; 38 - rev = "yaml-cpp-${version}"; 39 - sha256 = "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s"; 40 - }; 41 - 42 - patches = [ 43 - (fetchpatch { 44 - url = "https://github.com/jbeder/yaml-cpp/commit/4f48727b365962e31451cd91027bd797bc7d2ee7.patch"; 45 - sha256 = "sha256-jarZAh7NgwL3xXzxijDiAQmC/EC2WYfNMkYHEIQBPhM="; 46 - }) 47 22 ]; 48 23 }); 49 24 in 50 25 stdenv.mkDerivation rec { 51 26 pname = "micromamba"; 52 - version = "0.15.0"; 27 + version = "0.18.1"; 53 28 54 29 src = fetchFromGitHub { 55 30 owner = "mamba-org"; 56 31 repo = "mamba"; 57 32 rev = version; 58 - sha256 = "1zksp4zqj4wn9p9jb1qx1acajaz20k9xnm80yi7bab2d37y18hcw"; 33 + sha256 = "1gr9r257l300hafp8zm61bn58rysdk9i4wv1879q96b6n6v8hwa6"; 59 34 }; 60 35 61 36 nativeBuildInputs = [ cmake ]; ··· 65 40 nlohmann_json 66 41 curl 67 42 libarchive 68 - libyamlcpp' 43 + libyamlcpp 69 44 libsolv' 70 45 reproc 71 - # python3Packages.pybind11 # Would be necessary if someone wants to build with bindings I guess. 46 + spdlog 47 + termcolor 48 + ghc_filesystem 72 49 ]; 73 50 51 + postPatch = '' 52 + # See https://github.com/gabime/spdlog/issues/1897 53 + sed -i '1a add_compile_definitions(SPDLOG_FMT_EXTERNAL)' CMakeLists.txt 54 + echo 'target_link_libraries(micromamba PRIVATE -lspdlog -lfmt)' >> micromamba/CMakeLists.txt 55 + ''; 56 + 74 57 cmakeFlags = [ 75 - "-DBUILD_BINDINGS=OFF" # Fails to build, I don't think it's necessary for now. 76 - "-DBUILD_EXE=ON" 58 + "-DBUILD_LIBMAMBA=ON" 59 + "-DBUILD_SHARED=ON" 60 + "-DBUILD_MICROMAMBA=ON" 61 + # "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" 77 62 ]; 78 63 79 - CXXFLAGS = "-DMAMBA_USE_STD_FS"; 80 - 81 64 meta = with lib; { 82 65 description = "Reimplementation of the conda package manager"; 83 66 homepage = "https://github.com/mamba-org/mamba"; 84 67 license = licenses.bsd3; 68 + platforms = platforms.linux; 85 69 maintainers = with maintainers; [ mausch ]; 86 70 }; 87 71 }