blob: 1494d9f06a8a9a626b7d6d6e3972e0a95d091c78 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{ stdenv, lib, fetchurl, autoreconfHook, pam, qrencode }:
stdenv.mkDerivation rec {
name = "google-authenticator-libpam-${version}";
version = "1.03";
src = fetchurl {
url = "https://github.com/google/google-authenticator-libpam/archive/${version}.tar.gz";
sha256 = "0wb95z5v1w4sk0p7y9pbn4v95w9hrbf80vw9k2z2sgs0156ljkb7";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ pam ];
preConfigure = ''
sed -i "s|libqrencode.so.3|${qrencode}/lib/libqrencode.so.3|" src/google-authenticator.c
'';
installPhase = ''
mkdir -p $out/bin $out/lib/security
cp ./.libs/pam_google_authenticator.so $out/lib/security
cp google-authenticator $out/bin
'';
meta = with lib; {
homepage = https://github.com/google/google-authenticator-libpam;
description = "Two-step verification, with pam module";
license = licenses.asl20;
maintainers = with maintainers; [ aneeshusa ];
platforms = platforms.linux;
};
}
|