From 85b9918b17445dff3077f47732a1201685e7b444 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Thu, 23 Jan 2025 21:20:34 +0100 Subject: [PATCH 1/3] foundationdb: pin boost to 1.86 --- pkgs/servers/foundationdb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/foundationdb/default.nix b/pkgs/servers/foundationdb/default.nix index 5a48c9337243..3d350075cd0a 100644 --- a/pkgs/servers/foundationdb/default.nix +++ b/pkgs/servers/foundationdb/default.nix @@ -11,7 +11,7 @@ openjdk, mono, openssl, - boost, + boost186, pkg-config, msgpack-cxx, toml11, @@ -26,7 +26,7 @@ in foundationdb73 = cmakeBuild { version = "7.3.42"; hash = "sha256-jQcm+HLai5da2pZZ7iLdN6fpQZxf5+/kkfv9OSXQ57c="; - inherit boost; + boost = boost186; ssl = openssl; patches = [ From 4b60f67148bbdb072bf4c20338a17fcbee9b80e3 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Thu, 23 Jan 2025 21:21:51 +0100 Subject: [PATCH 2/3] foundationdb: fix missing bindingtester dependency See https://github.com/apple/foundationdb/pull/11859 --- pkgs/servers/foundationdb/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/foundationdb/default.nix b/pkgs/servers/foundationdb/default.nix index 3d350075cd0a..591e45485aea 100644 --- a/pkgs/servers/foundationdb/default.nix +++ b/pkgs/servers/foundationdb/default.nix @@ -38,6 +38,12 @@ in url = "https://github.com/apple/foundationdb/commit/c35a23d3f6b65698c3b888d76de2d93a725bff9c.patch"; hash = "sha256-bneRoZvCzJp0Hp/G0SzAyUyuDrWErSpzv+ickZQJR5w="; }) + # Add a dependency that prevents bindingtester to run before the python bindings are generated + # https://github.com/apple/foundationdb/pull/11859 + (fetchpatch { + url = "https://github.com/apple/foundationdb/commit/8d04c97a74c6b83dd8aa6ff5af67587044c2a572.patch"; + hash = "sha256-ZLIcmcfirm1+96DtTIr53HfM5z38uTLZrRNHAmZL6rc="; + }) ]; }; } From 3701d859ae33c0eeb435f9f48fa8df782cb523d5 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Fri, 24 Jan 2025 09:44:27 +0100 Subject: [PATCH 3/3] foundationdb: mark cross-compiling as broken --- nixos/modules/services/databases/foundationdb.md | 2 +- pkgs/servers/foundationdb/cmake.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/foundationdb.md b/nixos/modules/services/databases/foundationdb.md index 3cf17f1e6362..5e31497ae3cd 100644 --- a/nixos/modules/services/databases/foundationdb.md +++ b/nixos/modules/services/databases/foundationdb.md @@ -18,7 +18,7 @@ To enable FoundationDB, add the following to your ```nix { services.foundationdb.enable = true; - services.foundationdb.package = pkgs.foundationdb73; # FoundationDB 7.r3.x + services.foundationdb.package = pkgs.foundationdb73; # FoundationDB 7.3.x } ``` diff --git a/pkgs/servers/foundationdb/cmake.nix b/pkgs/servers/foundationdb/cmake.nix index 2d88687b00cc..b1d925c6a8bf 100644 --- a/pkgs/servers/foundationdb/cmake.nix +++ b/pkgs/servers/foundationdb/cmake.nix @@ -135,6 +135,8 @@ let license = licenses.asl20; platforms = [ "x86_64-linux" ] ++ lib.optionals (!(avxEnabled version)) [ "aarch64-linux" ]; + # Fails when cross-compiling with "/bin/sh: gcc-ar: not found" + broken = stdenv.buildPlatform != stdenv.hostPlatform; maintainers = with maintainers; [ thoughtpolice lostnet ]; }; };