2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, oathToolkit }:
|
2018-04-18 20:27:03 +01:00
|
|
|
|
2018-03-04 20:14:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pass-otp";
|
2019-08-17 18:52:53 +01:00
|
|
|
version = "1.2.0";
|
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}";
|
2019-08-17 18:52:53 +01:00
|
|
|
sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v";
|
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
|
|
|
|
2019-08-17 18:52:53 +01:00
|
|
|
installFlags = [ "PREFIX=$(out)"
|
|
|
|
"BASHCOMPDIR=$(out)/share/bash-completion/completions"
|
|
|
|
];
|
2018-01-03 20:39:50 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-01-03 20:39:50 +00:00
|
|
|
description = "A pass extension for managing one-time-password (OTP) tokens";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/tadfisher/pass-otp";
|
2018-01-03 20:39:50 +00:00
|
|
|
license = licenses.gpl3;
|
2019-08-17 18:52:53 +01:00
|
|
|
maintainers = with maintainers; [ jwiegley tadfisher toonn ];
|
2018-01-03 20:39:50 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|