pizauth: fix build on darwin

This commit is contained in:
Moraxyc 2024-11-03 22:57:39 +08:00
parent 6f42eff1de
commit 0bd69ba761
No known key found for this signature in database

View File

@ -3,8 +3,8 @@
rustPlatform,
fetchFromGitHub,
installShellFiles,
apple-sdk_11,
stdenv,
darwin,
}:
rustPlatform.buildRustPackage rec {
@ -14,15 +14,16 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "ltratt";
repo = "pizauth";
rev = "pizauth-${version}";
rev = "refs/tags/pizauth-${version}";
hash = "sha256-9NezG644oCLTWHTdUaUpJbuwkJu3at/IGNH3FSxl/DI=";
};
cargoHash = "sha256-Lp5ovkQKShgT7EFvQ+5KE3eQWJEQAL68Bk1d+wUo+bc=";
nativeBuildInputs = [ installShellFiles ];
# pizauth cannot be built with default apple-sdk_10 on x86_64-darwin, pin to 11
buildInputs = lib.optional stdenv.hostPlatform.isDarwin apple-sdk_11;
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd pizauth \