1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 07:34:36 +00:00
nixpkgs/pkgs/tools/security/gen-oath-safe/default.nix

44 lines
1 KiB
Nix
Raw Normal View History

2021-03-25 14:27:19 +00:00
{ coreutils, fetchFromGitHub, file, libcaca, makeWrapper, python3, openssl, qrencode, lib, stdenv, yubikey-manager }:
2017-07-01 01:14:31 +01:00
stdenv.mkDerivation rec {
pname = "gen-oath-safe";
version = "0.11.0";
2017-07-01 01:14:31 +01:00
src = fetchFromGitHub {
owner = "mcepl";
repo = "gen-oath-safe";
rev = version;
sha256 = "1914z0jgj7lni0nf3hslkjgkv87mhxdr92cmhmbzhpjgjgr23ydp";
2017-07-01 01:14:31 +01:00
};
nativeBuildInputs = [ makeWrapper ];
2017-07-01 01:14:31 +01:00
2021-02-16 22:26:07 +00:00
dontBuild = true;
2017-07-01 01:14:31 +01:00
installPhase =
let
2021-01-15 09:19:50 +00:00
path = lib.makeBinPath [
2017-07-01 01:14:31 +01:00
coreutils
file
2017-07-01 01:14:31 +01:00
libcaca.bin
openssl.bin
2021-03-25 14:27:19 +00:00
python3
2017-07-01 01:14:31 +01:00
qrencode
yubikey-manager
];
in
''
mkdir -p $out/bin
cp gen-oath-safe $out/bin/
wrapProgram $out/bin/gen-oath-safe \
--prefix PATH : ${path}
'';
meta = with lib; {
homepage = "https://github.com/mcepl/gen-oath-safe";
2017-07-01 01:14:31 +01:00
description = "Script for generating HOTP/TOTP keys (and QR code)";
platforms = platforms.unix;
license = licenses.mit;
maintainers = [ maintainers.makefu ];
};
}