From 456c7ede940b5a7b170b807ffcfbe0e94d7c6447 Mon Sep 17 00:00:00 2001 From: Sam <30577766+Samasaur1@users.noreply.github.com> Date: Tue, 24 Dec 2024 21:53:12 -0800 Subject: [PATCH] pam-watchid: init --- pkgs/by-name/pa/pam-watchid/package.nix | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/pa/pam-watchid/package.nix diff --git a/pkgs/by-name/pa/pam-watchid/package.nix b/pkgs/by-name/pa/pam-watchid/package.nix new file mode 100644 index 000000000000..d6b75d59a5e8 --- /dev/null +++ b/pkgs/by-name/pa/pam-watchid/package.nix @@ -0,0 +1,39 @@ +{ + lib, + swiftPackages, + swift, + swiftpm, + fetchFromGitHub, + ... +}: + +swiftPackages.stdenv.mkDerivation { + pname = "pam-watchid"; + version = "2-unstable-2024-12-24"; + + src = fetchFromGitHub { + owner = "Logicer16"; + repo = "pam-watchid"; + rev = "bb9c6ea62207dd9d41a08ca59c7a1f5d6fa07189"; + hash = "sha256-6SqSACoG7VkyYfz+xyU/L2J69RxHTTvzGexjGB2gDuY="; + }; + + nativeBuildInputs = [ + swift + swiftpm + ]; + + installPhase = '' + binPath="$(swiftpmBinPath)" + mkdir -p $out/lib + cp $binPath/libpam-watchid.dylib $out/lib/pam_watchid.so + ''; + + meta = { + description = "PAM plugin module that allows the Apple Watch to be used for authentication"; + homepage = "https://github.com/Logicer16/pam-watchid"; + license = lib.licenses.unlicense; + maintainers = [ lib.maintainers.samasaur ]; + platforms = lib.platforms.darwin; + }; +}