about summary refs log tree commit diff
path: root/pkgs/tools/security/gen-oath-safe
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-07-01 02:14:31 +0200
committermakefu <github@syntax-fehler.de>2017-07-01 18:05:31 +0200
commitf075c0c9fa76cf334e32ca9e8d41ec9827f621af (patch)
tree4e6a60305f5ff2c0c225c19b8bcb353cd4345a31 /pkgs/tools/security/gen-oath-safe
parent0d4431cfe90b2242723ccb1ccc90714f2f68a609 (diff)
gen-oath-safe: init at 2017-01-23
Diffstat (limited to 'pkgs/tools/security/gen-oath-safe')
-rw-r--r--pkgs/tools/security/gen-oath-safe/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/security/gen-oath-safe/default.nix b/pkgs/tools/security/gen-oath-safe/default.nix
new file mode 100644
index 0000000000000..49770813b2b68
--- /dev/null
+++ b/pkgs/tools/security/gen-oath-safe/default.nix
@@ -0,0 +1,41 @@
+{ coreutils, fetchFromGitHub, libcaca, makeWrapper, python, openssl, qrencode, stdenv, yubikey-manager }:
+
+stdenv.mkDerivation {
+  name = "gen-oath-safe-2017-01-23";
+  src = fetchFromGitHub {
+    owner = "mcepl";
+    repo = "gen-oath-safe";
+    rev = "fb53841";
+    sha256 = "0018kqmhg0861r5xkbis2a1rx49gyn0dxcyj05wap5ms7zz69m0m";
+  };
+
+  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 ];
+  };
+
+}