2018-04-18 20:27:03 +01:00
|
|
|
{ stdenv, fetchFromGitHub, oathToolkit }:
|
|
|
|
|
2018-03-04 20:14:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pass-otp-${version}";
|
2018-07-06 19:43:45 +01:00
|
|
|
version = "1.1.1";
|
2018-01-03 20:39:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tadfisher";
|
|
|
|
repo = "pass-otp";
|
2018-03-04 20:14:23 +00:00
|
|
|
rev = "v${version}";
|
2018-07-06 19:43:45 +01:00
|
|
|
sha256 = "0m8x5dqwcr9jim530685nsq4zn941hhl7ridmmd63b204z141rwa";
|
2018-01-03 20:39:50 +00:00
|
|
|
};
|
|
|
|
|
2018-04-18 20:27:03 +01:00
|
|
|
buildInputs = [ oathToolkit ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
2018-01-03 23:23:14 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
|
|
|
|
'';
|
2018-01-03 20:39:50 +00:00
|
|
|
|
2018-04-18 20:27:03 +01:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2018-01-03 20:39:50 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A pass extension for managing one-time-password (OTP) tokens";
|
|
|
|
homepage = https://github.com/tadfisher/pass-otp;
|
|
|
|
license = licenses.gpl3;
|
2018-03-04 20:14:23 +00:00
|
|
|
maintainers = with maintainers; [ jwiegley tadfisher ];
|
2018-01-03 20:39:50 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|