4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
33 lines
880 B
Nix
33 lines
880 B
Nix
{ lib, stdenv, fetchFromGitHub, oathToolkit }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pass-otp";
|
|
version = "1.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tadfisher";
|
|
repo = "pass-otp";
|
|
rev = "v${version}";
|
|
sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v";
|
|
};
|
|
|
|
buildInputs = [ oathToolkit ];
|
|
|
|
dontBuild = true;
|
|
|
|
patchPhase = ''
|
|
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
|
|
'';
|
|
|
|
installFlags = [ "PREFIX=$(out)"
|
|
"BASHCOMPDIR=$(out)/share/bash-completion/completions"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A pass extension for managing one-time-password (OTP) tokens";
|
|
homepage = "https://github.com/tadfisher/pass-otp";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ jwiegley tadfisher toonn ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|