fix: mac build (#84)

* fix: mac build

- fix error: `error: darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub`
- fix librln hash
- bumped nim-ffi

* fix: typo
This commit is contained in:
Pablo Lopez 2026-02-25 01:40:08 +02:00 committed by GitHub
parent 74fcb612db
commit a97d8c1717
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 20 deletions

View File

@ -1,5 +1,5 @@
{ lib, stdenv, nim, which, pkg-config, writeScriptBin,
openssl, miniupnpc, libnatpmp, darwin ? null,
openssl, miniupnpc, libnatpmp,
src, # logos-chat source (self from flake, with submodules=1)
libchatDrv, # result of libchat.nix
librln }: # result of librln.nix
@ -43,12 +43,7 @@ in stdenv.mkDerivation {
# which doesn't exist. Point XDG_CACHE_HOME at /tmp so Nim writes its cache there.
XDG_CACHE_HOME = "/tmp";
buildInputs = [ openssl miniupnpc libnatpmp ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
Security
CoreFoundation
SystemConfiguration
]);
buildInputs = [ openssl miniupnpc libnatpmp ];
configurePhase = ''
runHook preConfigure

View File

@ -1,5 +1,4 @@
{ lib, stdenv, rust-bin, makeRustPlatform, perl, pkg-config, cmake,
darwin ? null }:
{ lib, stdenv, rust-bin, makeRustPlatform, perl, pkg-config, cmake }:
let
rustToolchain = rust-bin.fromRustupToolchainFile ../vendor/libchat/rust_toolchain.toml;
@ -20,10 +19,6 @@ in rPlatform.buildRustPackage {
};
nativeBuildInputs = [ perl pkg-config cmake ];
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
Security
SystemConfiguration
]);
doCheck = false;
installPhase = ''

View File

@ -12,7 +12,7 @@ let
"x86_64-linux" = "sha256-FVXW7HHbmxxp6vy7Ji5iy0Y483P9JJXUnkyE84j3gZk=";
"aarch64-linux" = "sha256-E5dir4E/UT0XiaKJxnEXRz9pIGRwWHr5fHkRPYN6T80=";
"x86_64-darwin" = "sha256-FyuXn7hlecZMDhghE6CknVWNN9JMOADzVUVIUxknO78=";
"aarch64-darwin" = "sha256-8buoDdGtPDtrVQh7oIpmd9OYqTkS5byGgjo7zhNLn84=";
"aarch64-darwin" = "sha256-q8O4NXA+czpq6faFi4E44pl4rGe3DUHflIvBwWZ/ngI=";
};
triplet = triplets.${stdenv.hostPlatform.system};
tarball = fetchurl {

View File

@ -2,18 +2,15 @@
let
libExt = if stdenv.isDarwin then "dylib" else "so";
darwinDeps = lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
Security CoreFoundation SystemConfiguration
]);
in pkgs.mkShell {
buildInputs = with pkgs; [
nim cargo rustc clippy rustfmt
git cmake gnumake which pkg-config
openssl miniupnpc libnatpmp
] ++ darwinDeps;
];
shellHook = ''
export CONVERSATIONS_LIB="${libchatDrv}/lib/liblogos_chat.${libExt}"
export CONVERSATIONS_LIB="${libchatDrv}/lib/liblibchat.${libExt}"
echo "logos-chat dev shell. CONVERSATIONS_LIB=$CONVERSATIONS_LIB"
echo "Build: make liblogoschat"
echo "Nix build: nix build '.?submodules=1#'"

2
vendor/nim-ffi vendored

@ -1 +1 @@
Subproject commit c2c03f1f0f300ec3aab8b733fe97575f452f6133
Subproject commit bb8a3e7e221c36effd528605a6eb8ecd0f8b22dd