about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Bourjau <christian.bourjau@quantco.com>2023-01-29 14:59:19 +0100
committerChristian Bourjau <christian.bourjau@quantco.com>2023-01-30 10:16:11 +0100
commitee303854a07309a8dcfd6c89cfe72fcba2442824 (patch)
tree3bd2541b73e654d507e27fe5e5dce47166528005
parent40ef3bb63d4b6cf66aeb8468a0e8349cbc5aa5ca (diff)
micromamba: 1.0.0 -> 1.2.0
Update micromamba from 1.0.0 to 1.2.0. Spdlog is used as a header-only
library with its own vendored version of fmt_8 while micromamba depends
explicitly on fmt_9. Suggestions are welcome on how to best express
this for nixpkgs!
-rw-r--r--pkgs/tools/package-management/micromamba/default.nix25
1 files changed, 17 insertions, 8 deletions
diff --git a/pkgs/tools/package-management/micromamba/default.nix b/pkgs/tools/package-management/micromamba/default.nix
index 1df83b44ca62d..55b949aad4ef8 100644
--- a/pkgs/tools/package-management/micromamba/default.nix
+++ b/pkgs/tools/package-management/micromamba/default.nix
@@ -2,6 +2,7 @@
 , stdenv
 , fetchFromGitHub
 , fetchpatch
+, bzip2
 , cli11
 , cmake
 , curl
@@ -15,6 +16,7 @@
 , spdlog
 , termcolor
 , tl-expected
+, fmt_9
 }:
 
 let
@@ -34,28 +36,34 @@ let
   });
 
   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"
-    ];
+    # Use as header-only library.
+    #
+    # Spdlog 1.11 requires fmt version 8 while micromamba requires
+    # version 9. spdlog may use its bundled version of fmt,
+    # though. Micromamba is not calling spdlog functions with
+    # fmt-types in their signature. I.e. we get away with removing
+    # fmt_8 from spdlog's propagated dependencies and using fmt_9 for
+    # micromamba itself.
+    dontBuild = true;
+    cmakeFlags = oldAttrs.cmakeFlags ++ [ "-DSPDLOG_FMT_EXTERNAL=OFF" ];
+    propagatedBuildInputs = [];
   });
 in
 stdenv.mkDerivation rec {
   pname = "micromamba";
-  version = "1.0.0";
+  version = "1.2.0";
 
   src = fetchFromGitHub {
     owner = "mamba-org";
     repo = "mamba";
     rev = "micromamba-" + version;
-    sha256 = "sha256-t1DfLwBGW6MfazuFludn6/fdYWFaMnkhXva6bvus694=";
+    sha256 = "sha256-KGlH5i/lI6c1Jj1ttAOrip8BKECaea5D202TJMcFDmM=";
   };
 
   nativeBuildInputs = [ cmake ];
 
   buildInputs = [
+    bzip2
     cli11
     nlohmann_json
     curl
@@ -68,6 +76,7 @@ stdenv.mkDerivation rec {
     ghc_filesystem
     python3
     tl-expected
+    fmt_9
   ];
 
   cmakeFlags = [