2017-07-01 03:14:31 +03:00
|
|
|
{ coreutils, fetchFromGitHub, libcaca, makeWrapper, python, openssl, qrencode, stdenv, yubikey-manager }:
|
|
|
|
|
2018-10-02 13:47:56 +03:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gen-oath-safe-${version}";
|
|
|
|
version = "0.11.0";
|
2017-07-01 03:14:31 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mcepl";
|
|
|
|
repo = "gen-oath-safe";
|
2018-10-02 13:47:56 +03:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1914z0jgj7lni0nf3hslkjgkv87mhxdr92cmhmbzhpjgjgr23ydp";
|
2017-07-01 03:14:31 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildPhase = ":";
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
let
|
|
|
|
path = stdenv.lib.makeBinPath [
|
|
|
|
coreutils
|
|
|
|
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}
|
|
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/mcepl/gen-oath-safe;
|
|
|
|
description = "Script for generating HOTP/TOTP keys (and QR code)";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.makefu ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|