1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/google-authenticator/default.nix

31 lines
845 B
Nix
Raw Normal View History

2016-10-16 17:42:51 +01:00
{ stdenv, lib, 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 ];
preConfigure = ''
sed -i 's|libqrencode.so.3|${qrencode}/lib/libqrencode.so.3|' google-authenticator.c
'';
2013-03-30 19:45:38 +00:00
installPhase = ''
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
'';
2016-10-16 17:42:51 +01:00
meta = with lib; {
2013-03-30 19:45:38 +00:00
homepage = https://code.google.com/p/google-authenticator/;
description = "Two-step verification, with pam module";
2016-10-16 17:42:51 +01:00
license = licenses.asl20;
maintainers = with maintainers; [ aneeshusa ];
platforms = platforms.linux;
2013-03-30 19:45:38 +00:00
};
}