2018-04-18 21:27:03 +02:00
|
|
|
{ stdenv, fetchFromGitHub, oathToolkit }:
|
|
|
|
|
2018-03-04 21:14:23 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pass-otp-${version}";
|
2018-07-06 20:43:45 +02:00
|
|
|
version = "1.1.1";
|
2018-01-03 21:39:50 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tadfisher";
|
|
|
|
repo = "pass-otp";
|
2018-03-04 21:14:23 +01:00
|
|
|
rev = "v${version}";
|
2018-07-06 20:43:45 +02:00
|
|
|
sha256 = "0m8x5dqwcr9jim530685nsq4zn941hhl7ridmmd63b204z141rwa";
|
2018-01-03 21:39:50 +01:00
|
|
|
};
|
|
|
|
|
2018-04-18 21:27:03 +02:00
|
|
|
buildInputs = [ oathToolkit ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
2018-01-04 00:23:14 +01:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
|
|
|
|
'';
|
2018-01-03 21:39:50 +01:00
|
|
|
|
2018-04-18 21:27:03 +02:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2018-01-03 21:39:50 +01: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 21:14:23 +01:00
|
|
|
maintainers = with maintainers; [ jwiegley tadfisher ];
|
2018-01-03 21:39:50 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|