Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 bzip2, 7 cli11, 8 cmake, 9 curl, 10 ghc_filesystem, 11 libarchive, 12 libsolv, 13 yaml-cpp, 14 nlohmann_json, 15 python3, 16 reproc, 17 spdlog, 18 tl-expected, 19}: 20 21let 22 libsolv' = libsolv.overrideAttrs (oldAttrs: { 23 cmakeFlags = oldAttrs.cmakeFlags ++ [ 24 "-DENABLE_CONDA=true" 25 ]; 26 27 patches = [ 28 # Apply the same patch as in the "official" boa-forge build: 29 # https://github.com/mamba-org/boa-forge/tree/master/libsolv 30 (fetchpatch { 31 url = "https://raw.githubusercontent.com/mamba-org/boa-forge/20530f80e2e15012078d058803b6e2c75ed54224/libsolv/conda_variant_priorization.patch"; 32 sha256 = "1iic0yx7h8s662hi2jqx68w5kpyrab4fr017vxd4wyxb6wyk35dd"; 33 }) 34 ]; 35 }); 36in 37stdenv.mkDerivation rec { 38 pname = "micromamba"; 39 version = "1.5.8"; 40 41 src = fetchFromGitHub { 42 owner = "mamba-org"; 43 repo = "mamba"; 44 rev = "micromamba-" + version; 45 hash = "sha256-sxZDlMFoMLq2EAzwBVO++xvU1C30JoIoZXEX/sqkXS0="; 46 }; 47 48 nativeBuildInputs = [ cmake ]; 49 50 buildInputs = [ 51 bzip2 52 cli11 53 nlohmann_json 54 curl 55 libarchive 56 yaml-cpp 57 libsolv' 58 reproc 59 spdlog 60 ghc_filesystem 61 python3 62 tl-expected 63 ]; 64 65 cmakeFlags = [ 66 "-DBUILD_LIBMAMBA=ON" 67 "-DBUILD_SHARED=ON" 68 "-DBUILD_MICROMAMBA=ON" 69 # "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" 70 ]; 71 72 meta = with lib; { 73 description = "Reimplementation of the conda package manager"; 74 homepage = "https://github.com/mamba-org/mamba"; 75 license = licenses.bsd3; 76 platforms = platforms.all; 77 maintainers = with maintainers; [ mausch ]; 78 mainProgram = "micromamba"; 79 }; 80}