2021-01-11 07:54:33 +00:00
|
|
|
{ coreutils, fetchFromGitHub, file, libcaca, makeWrapper, python, openssl, qrencode, lib, stdenv, yubikey-manager }:
|
2017-07-01 00:14:31 +00:00
|
|
|
|
2018-10-02 10:47:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gen-oath-safe";
|
2018-10-02 10:47:56 +00:00
|
|
|
version = "0.11.0";
|
2017-07-01 00:14:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mcepl";
|
|
|
|
repo = "gen-oath-safe";
|
2018-10-02 10:47:56 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1914z0jgj7lni0nf3hslkjgkv87mhxdr92cmhmbzhpjgjgr23ydp";
|
2017-07-01 00:14:31 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-07-01 00:14:31 +00:00
|
|
|
|
2021-02-16 22:26:07 +00:00
|
|
|
dontBuild = true;
|
2017-07-01 00:14:31 +00:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
let
|
2021-01-15 09:19:50 +00:00
|
|
|
path = lib.makeBinPath [
|
2017-07-01 00:14:31 +00:00
|
|
|
coreutils
|
2020-05-22 20:19:38 +00:00
|
|
|
file
|
2017-07-01 00:14:31 +00:00
|
|
|
libcaca.bin
|
|
|
|
openssl.bin
|
|
|
|
python
|
|
|
|
qrencode
|
|
|
|
yubikey-manager
|
|
|
|
];
|
|
|
|
in
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp gen-oath-safe $out/bin/
|
|
|
|
wrapProgram $out/bin/gen-oath-safe \
|
|
|
|
--prefix PATH : ${path}
|
|
|
|
'';
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/mcepl/gen-oath-safe";
|
2017-07-01 00:14:31 +00:00
|
|
|
description = "Script for generating HOTP/TOTP keys (and QR code)";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.makefu ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|