nixpkgs/pkgs/tools/security/pass-otp/default.nix

31 lines
799 B
Nix
Raw Normal View History

{ stdenv, pass, fetchFromGitHub, oathToolkit }:
2018-03-04 21:14:23 +01:00
stdenv.mkDerivation rec {
name = "pass-otp-${version}";
version = "1.1.0";
2018-01-03 21:39:50 +01:00
src = fetchFromGitHub {
owner = "tadfisher";
repo = "pass-otp";
2018-03-04 21:14:23 +01:00
rev = "v${version}";
sha256 = "1cgj4zc8fq88n3h6c0vkv9i5al785mdprpgpbv5m22dz9p1wqvbb";
2018-01-03 21:39:50 +01:00
};
buildInputs = [ pass oathToolkit ];
patchPhase = ''
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
'';
2018-01-03 21:39:50 +01:00
installPhase = ''
make PREFIX=$out install
'';
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 21:14:23 +01:00
maintainers = with maintainers; [ jwiegley tadfisher ];
2018-01-03 21:39:50 +01:00
platforms = platforms.unix;
};
}