Add support for printing qr code for google-authenticator.

This commit is contained in:
Rob Vermaas 2014-02-20 12:30:49 +01:00
parent 94591762fe
commit cf00cd5e36

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pam }:
{ stdenv, fetchurl, pam, qrencode }:
stdenv.mkDerivation rec {
name = "google-authenticator-1.0";
@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
buildInputs = [ pam ];
preConfigure = ''
sed -i 's|libqrencode.so.3|${qrencode}/lib/libqrencode.so.3|' google-authenticator.c
'';
installPhase = ''
ensureDir $out/bin $out/lib/security
cp pam_google_authenticator.so $out/lib/security