2018-04-18 12:27:03 -07:00
|
|
|
{ stdenv, fetchFromGitHub, oathToolkit }:
|
|
|
|
|
2018-03-04 12:14:23 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "pass-otp";
|
2019-08-17 10:52:53 -07:00
|
|
|
version = "1.2.0";
|
2018-01-03 12:39:50 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tadfisher";
|
|
|
|
repo = "pass-otp";
|
2018-03-04 12:14:23 -08:00
|
|
|
rev = "v${version}";
|
2019-08-17 10:52:53 -07:00
|
|
|
sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v";
|
2018-01-03 12:39:50 -08:00
|
|
|
};
|
|
|
|
|
2018-04-18 12:27:03 -07:00
|
|
|
buildInputs = [ oathToolkit ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
2018-01-03 15:23:14 -08:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
|
|
|
|
'';
|
2018-01-03 12:39:50 -08:00
|
|
|
|
2019-08-17 10:52:53 -07:00
|
|
|
installFlags = [ "PREFIX=$(out)"
|
|
|
|
"BASHCOMPDIR=$(out)/share/bash-completion/completions"
|
|
|
|
];
|
2018-01-03 12:39:50 -08: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;
|
2019-08-17 10:52:53 -07:00
|
|
|
maintainers = with maintainers; [ jwiegley tadfisher toonn ];
|
2018-01-03 12:39:50 -08:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|