1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/os-specific/linux/google-authenticator/default.nix
Peter Simons 2d326e5032 Merge remote-tracking branch 'origin/master' into staging.
Conflicts:
	pkgs/desktops/e18/enlightenment.nix
2014-08-04 16:51:47 +02:00

29 lines
757 B
Nix

{ stdenv, fetchurl, pam, qrencode }:
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
'';
installPhase = ''
mkdir -p $out/bin $out/lib/security
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";
license = stdenv.lib.licenses.asl20;
};
}