nixpkgs/pkgs/os-specific/linux/google-authenticator/default.nix

33 lines
963 B
Nix
Raw Normal View History

2016-12-29 09:13:27 +00:00
{ stdenv, lib, fetchurl, autoreconfHook, pam, qrencode }:
2013-03-30 19:45:38 +00:00
stdenv.mkDerivation rec {
pname = "google-authenticator-libpam";
2020-01-06 14:07:16 +00:00
version = "1.08";
2013-03-30 19:45:38 +00:00
src = fetchurl {
2016-12-29 09:13:27 +00:00
url = "https://github.com/google/google-authenticator-libpam/archive/${version}.tar.gz";
2020-01-06 14:07:16 +00:00
sha256 = "1432sfgjv7xlas1saa0whnvqim2pb12g2522x3nf5a8v4qq7avbg";
2013-03-30 19:45:38 +00:00
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ pam ];
2013-03-30 19:45:38 +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
'';
2013-03-30 19:45:38 +00:00
installPhase = ''
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 17:42:51 +01:00
meta = with lib; {
2016-12-29 09:13:27 +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 17:42:51 +01:00
license = licenses.asl20;
maintainers = with maintainers; [ aneeshusa ];
platforms = platforms.linux;
2013-03-30 19:45:38 +00:00
};
}