@@ -0,0 +1,32 @@
1+{ stdenv, fetchFromGitHub, autoreconfHook, pam, gnupg }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "pam_gnupg";
5+ version = "0.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "cruegge";
9+ repo = "pam-gnupg";
10+ rev = "v${version}";
11+ sha256 = "0b70mazyvcbg6xyqllm62rwhbz0y94pcy202db1qyy4w8466bhsw";
12+ };
13+
14+ configureFlags = [
15+ "--with-moduledir=${placeholder "out"}/lib/security"
16+ ];
17+
18+ buildInputs = [ pam gnupg ];
19+
20+ nativeBuildInputs = [ autoreconfHook ];
21+
22+ meta = with stdenv.lib; {
23+ description = "Unlock GnuPG keys on login";
24+ longDescription = ''
25+ A PAM module that hands over your login password to gpg-agent. This can
26+ be useful if you are using a GnuPG-based password manager like pass.
27+ '';
28+ homepage = "https://github.com/cruegge/pam-gnupg";
29+ license = licenses.gpl3;
30+ maintainers = with maintainers; [ mtreca ];
31+ };
32+}