1 { lib, stdenv, fetchFromGitHub, cmake, openpam, darwin }:
3 stdenv.mkDerivation rec {
4 pname = "pam_reattach";
7 src = fetchFromGitHub {
8 owner = "fabianishere";
11 sha256 = "1k77kxqszdwgrb50w7algj22pb4fy5b9649cjb08zq9fqrzxcbz7";
15 "-DCMAKE_OSX_ARCHITECTURES=${
16 if stdenv.hostPlatform.system == "x86_64-darwin" then
22 ] ++ lib.optional (!stdenv.isAarch64) "-DCMAKE_LIBRARY_PATH=${darwin.apple_sdk.sdk}/usr/lib";
24 buildInputs = [ openpam ]
25 ++ lib.optional (!stdenv.isAarch64) darwin.apple_sdk.sdk;
27 nativeBuildInputs = [ cmake ];
30 homepage = "https://github.com/fabianishere/pam_reattach";
31 description = "Reattach to the user's GUI session on macOS during authentication (for Touch ID support in tmux)";
32 license = licenses.mit;
33 maintainers = with maintainers; [ lockejan ];
34 platforms = platforms.darwin;