From a5abb2e10b01026cc1b7109815994c202455cd97 Mon Sep 17 00:00:00 2001 From: Philippe Crama Date: Wed, 27 Mar 2019 19:55:01 +0000 Subject: [PATCH] Add instructions how to get onlykey-cli running on NixOs --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 41b9570..1fffd1b 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,33 @@ $ sudo pacman -Sy git python2-setuptools python2 libusb python2-pip $ pip install onlykey ``` +### NixOS Install with dependencies + +#### First time + +NB: shell prompts are approximative + +``` +$ git clone --depth 1 https://github.com/trustcrypto/python-onlykey.git +$ cd python-onlykey +$ git submodule init +$ git submodule update +$ nix-shell -p python2.pkgs.{pip,virtualenv,ed25519,cython,six,hidapi,ecdsa,aenum,wcwidth} +# Not prompt_toolkit, on my NixOS 18.09.2390.40e716b92a7 (Jellyfish), prompt_toolkit=1.0.15 +# but onlykey wants prompt_toolkit > 2 +[nix-shell]$ virtualenv --system-site-packages build +[nix-shell]$ source build/bin/activate +(build) [nix-shell]$ pip install 'prompt_toolkit>2' +``` + +#### After that + +You can run the tool with + +``` +$ nix-shell -p python2.pkgs.{pip,virtualenv,ed25519,cython,six,hidapi,ecdsa,aenum,wcwidth} --command 'cd python-onlykey && source build/bin/activate ; cd onlykey && python -c "import cli; cli.main()"' +``` + ### FreeBSD Install with dependencies See forum thread - https://groups.google.com/forum/#!category-topic/onlykey/new-features-and-feature-requests/CEYwdXjB508