2014-02-20 11:30:49 +00:00
|
|
|
{ stdenv, fetchurl, pam, qrencode }:
|
2013-03-30 19:45:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "google-authenticator-1.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://google-authenticator.googlecode.com/files/libpam-${name}-source.tar.bz2";
|
|
|
|
sha1 = "017b7d89989f1624e360abe02d6b27a6298d285d";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ pam ];
|
|
|
|
|
2014-02-20 11:30:49 +00:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's|libqrencode.so.3|${qrencode}/lib/libqrencode.so.3|' google-authenticator.c
|
|
|
|
'';
|
|
|
|
|
2013-03-30 19:45:38 +00:00
|
|
|
installPhase = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin $out/lib/security
|
2013-03-30 19:45:38 +00:00
|
|
|
cp pam_google_authenticator.so $out/lib/security
|
|
|
|
cp google-authenticator $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://code.google.com/p/google-authenticator/;
|
|
|
|
description = "Two-step verification, with pam module";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2013-03-30 19:45:38 +00:00
|
|
|
};
|
|
|
|
}
|