add pinentry-touchid for mac

This commit is contained in:
willemml 2023-01-30 10:29:20 -08:00
parent 391f5bb318
commit 53496a2d8e
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
3 changed files with 41 additions and 0 deletions

View file

@ -9,6 +9,7 @@ let
karabiner-elements
pinentry_mac
spoof-mac
(pkgs.callPackage ./packages/pinentry-touchid.nix { inherit pkgs; })
(pkgs.callPackage ./packages/qbittorrent-mac.nix { inherit pkgs; })
(pkgs.callPackage ./packages/spotify-mac.nix { inherit pkgs; })
(pkgs.callPackage ./packages/vlc-mac.nix { inherit pkgs; })

View file

@ -0,0 +1,39 @@
{ stdenv, pkgs, fetchFromGitHub, ... }:
pkgs.mkShell {
name = "pinentry-touchid";
src = fetchFromGitHub {
owner = "jorgelbg";
repo = "pinentry-touchid";
rev = "1170eb6bc7b23313aee622887b47b77be6e5fb5f";
sha256 = "sha256-DT8vYDcBD5FMMVe4JcxNmYnfJ1o18deiKkfVQcW3AN0=";
};
buildInputs = with pkgs; [
go
gopls
gotools
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Foundation
darwin.apple_sdk.frameworks.LocalAuthentication
];
buildPhase = ''
unset GOPATH GOROOT
export NIX_LDFLAGS="-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS";
go mod download
go build
'';
installPhase = ''
mkdir -p $out/bin
cp pinentry-touchid $out/bin/.
'';
shellHook = ''
unset GOPATH GOROOT
export NIX_LDFLAGS="-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS";
'';
}

View file

@ -136,6 +136,7 @@
email = "open -a Mail";
o = "open -a";
am = lib.mkIf pkgs.stdenv.isDarwin "zsh ~/.config/zsh/am.sh";
pinentry = "pinentry-mac";
};
};