From dd860c5bf0cfb181660a23ea5ce1e8c255755d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Mon, 25 Nov 2024 20:06:12 +0100 Subject: [PATCH] use new apple sdk api --- default.nix | 2 +- package.nix | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/default.nix b/default.nix index b94c7554..65a08dd1 100644 --- a/default.nix +++ b/default.nix @@ -41,7 +41,7 @@ let inherit lib rustPlatform; fetchFromGitHub = pkgs.fetchFromGitHub; stdenv = pkgs.stdenv; - darwin = pkgs.darwin; + apple-sdk = if pkgs.stdenv.hostPlatform.isx86_64 then pkgs.apple-sdk_13 else pkgs.apple-sdk_14; installShellFiles = false; installShellCompletions = false; installManPages = false; diff --git a/package.nix b/package.nix index 5c86074b..a8809e59 100644 --- a/package.nix +++ b/package.nix @@ -3,7 +3,7 @@ , rustPlatform , fetchFromGitHub , stdenv -, darwin +, apple-sdk , installShellFiles , installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform , installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform @@ -28,20 +28,15 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-YS8IamapvmdrOPptQh2Ef9Yold0IK1XIeGs0kDIQ5b8="; - NIX_LDFLAGS = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ - "-L${darwin.apple_sdk_11_0.frameworks.Security}/Library/Frameworks -framework Security" - ]; - # unit tests only doCheck = false; cargoTestFlags = [ "--lib" ]; nativeBuildInputs = [ pkg-config ] - ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) darwin.apple_sdk_11_0.frameworks.Security ++ lib.optional (installManPages || installShellCompletions) installShellFiles; buildInputs = [ ] - ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) darwin.apple_sdk_11_0.frameworks.Security + ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk ++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch ++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) gpgme;