2013-03-30 19:01:05 +00:00
|
|
|
{ stdenv, fetchurl, pam }:
|
|
|
|
|
2013-03-30 20:05:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-03-30 19:01:05 +00:00
|
|
|
name = "otpw-1.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.cl.cam.ac.uk/~mgk25/download/${name}.tar.gz";
|
2013-03-30 19:01:05 +00:00
|
|
|
sha256 = "1k3hc7xbxz6hkc55kvddi3cibafwf93ivn58sy1l888d3l5dwmrk";
|
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's/^CFLAGS.*/CFLAGS=-O2 -fPIC/' Makefile
|
2013-03-30 20:05:29 +00:00
|
|
|
sed -i -e 's,PATH=.*;,,' conf.h
|
|
|
|
sed -i -e '/ENTROPY_ENV/d' otpw-gen.c
|
2013-03-30 19:01:05 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out/bin $out/lib/security $out/share/man/man{1,8}
|
2013-03-30 19:01:05 +00:00
|
|
|
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 ];
|
|
|
|
|
2016-08-24 18:19:43 +01:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
2013-03-30 19:01:05 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.cl.cam.ac.uk/~mgk25/otpw.html;
|
|
|
|
description = "A one-time password login package";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2013-03-30 19:01:05 +00:00
|
|
|
};
|
|
|
|
}
|