asmo 1 месяц назад
Родитель
Сommit
bc6b35ddf1
1 измененных файлов с 15 добавлено и 3 удалено
  1. 15 3
      flake.nix

+ 15 - 3
flake.nix

@@ -46,8 +46,7 @@
           with pkgs;
           lib.optionals isDarwin [
             # Additional darwin specific inputs can be set here
-            darwin.apple_sdk.frameworks.Security
-            darwin.apple_sdk.frameworks.SystemConfiguration
+            # Note: Security and SystemConfiguration frameworks are provided by the default SDK
           ];
 
         # Dependencies
@@ -385,6 +384,19 @@
           # rust analyzer needs  NIX_PATH for some reason.
           NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
         };
+        # Override clightning to include mako dependency and fix compilation bug
+        clightningWithMako = pkgs.clightning.overrideAttrs (oldAttrs: {
+          nativeBuildInputs = (oldAttrs.nativeBuildInputs or [ ]) ++ [
+            pkgs.python311Packages.mako
+          ];
+
+          # Disable -Werror to work around multiple compilation bugs in 25.09.2 on macOS
+          # See: https://github.com/ElementsProject/lightning/issues/7961
+          env = (oldAttrs.env or { }) // {
+            NIX_CFLAGS_COMPILE = toString ((oldAttrs.env.NIX_CFLAGS_COMPILE or "") + " -Wno-error");
+          };
+        });
+
         buildInputs =
           with pkgs;
           [
@@ -397,7 +409,7 @@
             nixpkgs-fmt
             typos
             lnd
-            clightning
+            clightningWithMako
             bitcoind
             sqlx-cli
             mprocs