summary refs log tree commit diff
path: root/pkgs/os-specific/linux/google-authenticator/default.nix
diff options
context:
space:
mode:
authorAneesh Agrawal <aneeshusa@gmail.com>2016-12-29 04:13:27 -0500
committerGraham Christensen <graham@grahamc.com>2016-12-30 06:49:17 -0500
commit652a87018b9c86e02d7c7b5c627a19bd7b73543c (patch)
tree025851e6da64a34e73deecbc953b6f0583302433 /pkgs/os-specific/linux/google-authenticator/default.nix
parenta94e5a87f9b10a6ff4d574fcd959fd044decf624 (diff)
downloadnixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.tar
nixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.tar.gz
nixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.tar.bz2
nixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.tar.lz
nixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.tar.xz
nixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.tar.zst
nixpkgs-652a87018b9c86e02d7c7b5c627a19bd7b73543c.zip
googleAuthenticator: 1.0 -> 1.03
Diffstat (limited to 'pkgs/os-specific/linux/google-authenticator/default.nix')
-rw-r--r--pkgs/os-specific/linux/google-authenticator/default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/google-authenticator/default.nix b/pkgs/os-specific/linux/google-authenticator/default.nix
index 0e5f6208382..119621d9278 100644
--- a/pkgs/os-specific/linux/google-authenticator/default.nix
+++ b/pkgs/os-specific/linux/google-authenticator/default.nix
@@ -1,27 +1,28 @@
-{ stdenv, lib, fetchurl, pam, qrencode }:
+{ stdenv, lib, fetchurl, autoreconfHook, pam, qrencode }:
 
 stdenv.mkDerivation rec {
-  name = "google-authenticator-1.0";
+  name = "google-authenticator-libpam-${version}";
+  version = "1.03";
 
   src = fetchurl {
-    url = "https://google-authenticator.googlecode.com/files/libpam-${name}-source.tar.bz2";
-    sha1 = "017b7d89989f1624e360abe02d6b27a6298d285d";
+    url = "https://github.com/google/google-authenticator-libpam/archive/${version}.tar.gz";
+    sha256 = "0wb95z5v1w4sk0p7y9pbn4v95w9hrbf80vw9k2z2sgs0156ljkb7";
   };
 
-  buildInputs = [ pam ];
+  buildInputs = [ autoreconfHook pam ];
 
   preConfigure = ''
-    sed -i 's|libqrencode.so.3|${qrencode}/lib/libqrencode.so.3|' google-authenticator.c
+    sed -i "s|libqrencode.so.3|${qrencode}/lib/libqrencode.so.3|" src/google-authenticator.c
   '';
 
   installPhase = ''
     mkdir -p $out/bin $out/lib/security
-    cp pam_google_authenticator.so $out/lib/security
+    cp ./.libs/pam_google_authenticator.so $out/lib/security
     cp google-authenticator $out/bin
   '';
 
   meta = with lib; {
-    homepage = https://code.google.com/p/google-authenticator/;
+    homepage = https://github.com/google/google-authenticator-libpam;
     description = "Two-step verification, with pam module";
     license = licenses.asl20;
     maintainers = with maintainers; [ aneeshusa ];