2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, oath-toolkit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pass-otp";
|
|
|
|
version = "1.2.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tadfisher";
|
|
|
|
repo = "pass-otp";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v";
|
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildInputs = [ oath-toolkit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
patchPhase = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oath-toolkit}/bin/oathtool|' otp.bash
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)"
|
|
|
|
"BASHCOMPDIR=$(out)/share/bash-completion/completions"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A pass extension for managing one-time-password (OTP) tokens";
|
|
|
|
homepage = "https://github.com/tadfisher/pass-otp";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ jwiegley tadfisher toonn ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|