ungoogled-chromium: 131.0.6778.264-1 -> 132.0.6834.83-1 (#375093)
[NixPkgs.git] / pkgs / tools / security / pass / extensions / otp.nix
blobdbde743461af7808f8326cac5e8a3b8864de4fbe
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   oath-toolkit,
6 }:
8 stdenv.mkDerivation rec {
9   pname = "pass-otp";
10   version = "1.2.0";
12   src = fetchFromGitHub {
13     owner = "tadfisher";
14     repo = "pass-otp";
15     rev = "v${version}";
16     sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v";
17   };
19   buildInputs = [ oath-toolkit ];
21   dontBuild = true;
23   patchPhase = ''
24     sed -i -e 's|OATH=\$(which oathtool)|OATH=${oath-toolkit}/bin/oathtool|' otp.bash
25   '';
27   installFlags = [
28     "PREFIX=$(out)"
29     "BASHCOMPDIR=$(out)/share/bash-completion/completions"
30   ];
32   meta = with lib; {
33     description = "Pass extension for managing one-time-password (OTP) tokens";
34     homepage = "https://github.com/tadfisher/pass-otp";
35     license = licenses.gpl3;
36     maintainers = with maintainers; [
37       jwiegley
38       tadfisher
39       toonn
40     ];
41     platforms = platforms.unix;
42   };