evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / go / google-authenticator / package.nix
blob11791a664c8bb0762cc4a1a0aa94eff956fd6356
1 { stdenv, lib, fetchFromGitHub, autoreconfHook, pam, qrencode }:
3 stdenv.mkDerivation rec {
4   pname = "google-authenticator-libpam";
5   version = "1.10";
7   src = fetchFromGitHub {
8     owner = "google";
9     repo = "google-authenticator-libpam";
10     rev = version;
11     hash = "sha256-KEfwQeJIuRF+S3gPn+maDb8Fu0FRXLs2/Nlbjj2d3AE=";
12   };
14   nativeBuildInputs = [ autoreconfHook ];
15   buildInputs = [ pam ];
17   preConfigure = ''
18     sed -i "s|libqrencode.so.4|${qrencode.out}/lib/libqrencode.so.4|" src/google-authenticator.c
19   '';
21   installPhase = ''
22     mkdir -p $out/bin $out/lib/security
23     cp ./.libs/pam_google_authenticator.so $out/lib/security
24     cp google-authenticator $out/bin
25   '';
27   meta = with lib; {
28     homepage = "https://github.com/google/google-authenticator-libpam";
29     description = "Two-step verification, with pam module";
30     mainProgram = "google-authenticator";
31     license = licenses.asl20;
32     maintainers = with maintainers; [ aneeshusa ];
33     platforms = platforms.linux;
34   };