use new apple sdk api

This commit is contained in:
Clément DOUIN
2024-11-25 20:06:12 +01:00
parent bc8f0b3c51
commit dd860c5bf0
2 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -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;
+2 -7
View File
@@ -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;