2022-09-29 23:59:34 +00:00
|
|
|
{ lib, stdenv, fetchurl, pam, libxcrypt }:
|
2013-03-30 19:01:05 +00:00
|
|
|
|
2013-03-30 20:05:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-27 14:47:49 +00:00
|
|
|
pname = "otpw";
|
|
|
|
version = "1.3";
|
2013-03-30 19:01:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-27 14:47:49 +00:00
|
|
|
url = "https://www.cl.cam.ac.uk/~mgk25/download/otpw-${version}.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 12:56:10 +00: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
|
|
|
|
'';
|
|
|
|
|
2022-09-29 23:59:34 +00:00
|
|
|
buildInputs = [ pam libxcrypt ];
|
2013-03-30 19:01:05 +00:00
|
|
|
|
2016-08-24 17:19:43 +00:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
2013-03-30 19:01:05 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.cl.cam.ac.uk/~mgk25/otpw.html";
|
2013-03-30 19:01:05 +00:00
|
|
|
description = "A one-time password login package";
|
2021-01-15 14:45:37 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.linux;
|
2013-03-30 19:01:05 +00:00
|
|
|
};
|
|
|
|
}
|