fedimint: drop various darwin workarounds, use new sdk pattern

This commit is contained in:
Nick Cao 2024-11-30 08:51:52 -05:00
parent 682cf788e1
commit f826c0aafa
No known key found for this signature in database
2 changed files with 2 additions and 28 deletions

View File

@ -1,28 +1,13 @@
{ lib
, buildPackages
, clang
, fetchFromGitHub
, libclang
, libiconv
, llvmPackages_12
, openssl
, pkg-config
, protobuf
, rustPlatform
, stdenv
, Security
, SystemConfiguration
}:
let
# Rust rocksdb bindings have C++ compilation/linking errors on Darwin when using newer clang
# Forcing it to clang 12 fixes the issue.
buildRustPackage =
if stdenv.hostPlatform.isDarwin then
rustPlatform.buildRustPackage.override { stdenv = llvmPackages_12.stdenv; }
else
rustPlatform.buildRustPackage;
in
buildRustPackage rec {
rustPlatform.buildRustPackage rec {
pname = "fedimint";
version = "0.4.4";
@ -38,18 +23,11 @@ buildRustPackage rec {
nativeBuildInputs = [
protobuf
pkg-config
clang
(lib.getLib libclang)
rustPlatform.bindgenHook
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Security
libiconv
Security
SystemConfiguration
];
outputs = [ "out" "fedimintCli" "fedimint" "gateway" "gatewayCli" "devimint" ];

View File

@ -2345,10 +2345,6 @@ with pkgs;
fdroidcl = pkgs.callPackage ../development/mobile/fdroidcl { };
fedimint = callPackage ../by-name/fe/fedimint/package.nix {
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
};
flowgger = callPackage ../tools/misc/flowgger {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};