nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 42 lines 1.0 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 autoreconfHook, 6 pam, 7 qrencode, 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "google-authenticator-libpam"; 12 version = "1.11"; 13 14 src = fetchFromGitHub { 15 owner = "google"; 16 repo = "google-authenticator-libpam"; 17 rev = finalAttrs.version; 18 hash = "sha256-cLMX5SdKvyQr3annc/Hhhz6XgY+BypRHASKRh6xTdmo="; 19 }; 20 21 nativeBuildInputs = [ autoreconfHook ]; 22 buildInputs = [ pam ]; 23 24 preConfigure = '' 25 sed -i "s|libqrencode.so.4|${qrencode.out}/lib/libqrencode.so.4|" src/google-authenticator.c 26 ''; 27 28 installPhase = '' 29 mkdir -p $out/bin $out/lib/security 30 cp ./.libs/pam_google_authenticator.so $out/lib/security 31 cp google-authenticator $out/bin 32 ''; 33 34 meta = { 35 homepage = "https://github.com/google/google-authenticator-libpam"; 36 description = "Two-step verification, with pam module"; 37 mainProgram = "google-authenticator"; 38 license = lib.licenses.asl20; 39 maintainers = with lib.maintainers; [ aneeshusa ]; 40 platforms = lib.platforms.linux; 41 }; 42})