1 { stdenv, lib, fetchFromGitHub, autoreconfHook, pam, qrencode }:
3 stdenv.mkDerivation rec {
4 pname = "google-authenticator-libpam";
7 src = fetchFromGitHub {
9 repo = "google-authenticator-libpam";
11 hash = "sha256-KEfwQeJIuRF+S3gPn+maDb8Fu0FRXLs2/Nlbjj2d3AE=";
14 nativeBuildInputs = [ autoreconfHook ];
15 buildInputs = [ pam ];
18 sed -i "s|libqrencode.so.4|${qrencode.out}/lib/libqrencode.so.4|" src/google-authenticator.c
22 mkdir -p $out/bin $out/lib/security
23 cp ./.libs/pam_google_authenticator.so $out/lib/security
24 cp google-authenticator $out/bin
28 homepage = "https://github.com/google/google-authenticator-libpam";
29 description = "Two-step verification, with pam module";
30 mainProgram = "google-authenticator";
31 license = licenses.asl20;
32 maintainers = with maintainers; [ aneeshusa ];
33 platforms = platforms.linux;