2021-09-19 15:07:13 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, autoreconfHook, pam, qrencode }:
|
2013-03-30 19:45:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "google-authenticator-libpam";
|
2020-06-09 22:37:51 +00:00
|
|
|
version = "1.09";
|
2013-03-30 19:45:38 +00:00
|
|
|
|
2021-09-19 15:07:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "google-authenticator-libpam";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-DS0h6FWMNKnSSj039bH6iyWrERa5M7LBSkbyig6pyxY=";
|
2013-03-30 19:45:38 +00:00
|
|
|
};
|
|
|
|
|
2017-09-05 21:26:13 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ pam ];
|
2013-03-30 19:45:38 +00:00
|
|
|
|
2014-02-20 11:30:49 +00:00
|
|
|
preConfigure = ''
|
2019-01-01 16:19:07 +00:00
|
|
|
sed -i "s|libqrencode.so.4|${qrencode.out}/lib/libqrencode.so.4|" src/google-authenticator.c
|
2014-02-20 11:30:49 +00:00
|
|
|
'';
|
|
|
|
|
2013-03-30 19:45:38 +00:00
|
|
|
installPhase = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin $out/lib/security
|
2016-12-29 09:13:27 +00:00
|
|
|
cp ./.libs/pam_google_authenticator.so $out/lib/security
|
2013-03-30 19:45:38 +00:00
|
|
|
cp google-authenticator $out/bin
|
|
|
|
'';
|
|
|
|
|
2016-10-16 16:42:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/google/google-authenticator-libpam";
|
2013-03-30 19:45:38 +00:00
|
|
|
description = "Two-step verification, with pam module";
|
2016-10-16 16:42:51 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ aneeshusa ];
|
|
|
|
platforms = platforms.linux;
|
2013-03-30 19:45:38 +00:00
|
|
|
};
|
|
|
|
}
|