summary refs log tree commit diff
path: root/pkgs/os-specific/linux/otpw
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2013-03-30 20:01:05 +0100
committerLluís Batlle i Rossell <viric@viric.name>2013-03-30 21:06:05 +0100
commitc7cf2b16908778f7318297e051999d2a2ef79e00 (patch)
treec6e4ee96cd77fd2b7a3fbaf22781fa6b0cb55b63 /pkgs/os-specific/linux/otpw
parentc72ac21c55edbe4e7f8fb69a62dd747231e276e0 (diff)
downloadnixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.tar
nixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.tar.gz
nixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.tar.bz2
nixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.tar.lz
nixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.tar.xz
nixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.tar.zst
nixpkgs-c7cf2b16908778f7318297e051999d2a2ef79e00.zip
Adding otpw (a one-time password system)
Diffstat (limited to 'pkgs/os-specific/linux/otpw')
-rw-r--r--pkgs/os-specific/linux/otpw/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/otpw/default.nix b/pkgs/os-specific/linux/otpw/default.nix
new file mode 100644
index 00000000000..97b601be24c
--- /dev/null
+++ b/pkgs/os-specific/linux/otpw/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pam }:
+
+stdenv.mkDerivation {
+  name = "otpw-1.3";
+
+  src = fetchurl {
+    url = ttp://www.cl.cam.ac.uk/~mgk25/download/otpw-1.3.tar.gz;
+    sha256 = "1k3hc7xbxz6hkc55kvddi3cibafwf93ivn58sy1l888d3l5dwmrk";
+  };
+
+  patchPhase = ''
+    sed -i 's/^CFLAGS.*/CFLAGS=-O2 -fPIC/' Makefile
+  '';
+
+  installPhase = ''
+    ensureDir $out/bin $out/lib/security $out/share/man/man{1,8}
+    cp pam_*.so $out/lib/security
+    cp otpw-gen $out/bin
+    cp *.1 $out/share/man/man1
+    cp *.8 $out/share/man/man8
+  '';
+
+  buildInputs = [ pam ];
+
+  meta = {
+    homepage = http://www.cl.cam.ac.uk/~mgk25/otpw.html;
+    description = "A one-time password login package";
+    license = "GPLv2+";
+  };
+}