nixpkgs/pkgs/tools/security/pass/extensions/otp.nix

32 lines
793 B
Nix
Raw Normal View History

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}";
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}";
sha256 = "0m8x5dqwcr9jim530685nsq4zn941hhl7ridmmd63b204z141rwa";
2018-01-03 20:39:50 +00:00
};
2018-04-18 20:27:03 +01:00
buildInputs = [ oathToolkit ];
dontBuild = true;
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;
};
}