3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/pass/extensions/otp.nix

34 lines
880 B
Nix
Raw Normal View History

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