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