diff mbox series

[bug#53815,1/3] gnu: Add libnitrokey.

Message ID O8g3D7YkTUCb-cDXBL5FknF3N8cAgooY1_nOIZU_TWlgqPhHroI23xt4r0EK2thB4RukL1WQiSKzpBewkMOdMexMa2qbqI1JUVmdUk7Wk64=@protonmail.com
State Accepted
Headers show
Series [bug#53815,1/3] gnu: Add libnitrokey. | expand

Commit Message

phodina Feb. 6, 2022, 7:46 a.m. UTC
Hi,

Here are patches which add GUI tool to interface with Nitrokey hardware token.

----
Petr

Comments

M Feb. 6, 2022, 9:33 a.m. UTC | #1
phodina via Guix-patches via schreef op zo 06-02-2022 om 07:46 [+0000]:
> +    (arguments
> +     `(#:tests? #f)) ;no test suite

The following looks like (part of) a test suite to me:
<https://github.com/tplgy/cppcodec/blob/master/test/test_cppcodec.cpp>.

> +    (synopsis "Header only C++11 library to encode/decode base64,
> etc.")
> +    (description "This package provide header-only C++11 library to
> +encode/decode base64, base64url, base32, base32hex and hex.")
> +    (license license:expat)))

While the information about being header-only is useful for people
looking to bundle a dependency in their source code, it seems
irrelevant to people using cppcodec via Guix.

Greetings,
Maxime.
M Feb. 6, 2022, 9:34 a.m. UTC | #2
phodina via Guix-patches via schreef op zo 06-02-2022 om 07:46 [+0000]:
> +     `(#:tests? #f ;no test suite

I'm seeing a lot of tests at
<https://github.com/Nitrokey/libnitrokey/tree/master/unittest>.

Greetings,
Maxime.
M Feb. 6, 2022, 9:36 a.m. UTC | #3
phodina via Guix-patches via schreef op zo 06-02-2022 om 07:46 [+0000]:
> +              (snippet '(begin
> +                          (delete-file-recursively "hidapi")))

Does this have any effect? Looking at
<https://github.com/Nitrokey/libnitrokey>, it looks like 'hidapi' is a
git submodule, which would normally not be included in the checkout
because 'recursive?' has not been found.

If it does have any effect, then wouldn't "tests/catch" in cppcodec
need to be removed as well?

Greetings,
Maxime.
M Feb. 6, 2022, 9:38 a.m. UTC | #4
phodina via Guix-patches via schreef op zo 06-02-2022 om 07:46 [+0000]:
> +    (license license:lgpl3)))

Looking at
<https://github.com/Nitrokey/libnitrokey/blob/master/NK_C_API.cc>, the
license appears to be LGPL3+, even though the README just says LGPL3.
Possibly that's only for NK_C_API.cc though (unverified).

Greetings,
Maxime.
diff mbox series

Patch

From eef718af2c1218aebb1999acab864e281a945ac9 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 5 Feb 2022 23:27:06 +0100
Subject: [PATCH 3/3] gnu: Add nitrokey-app.

* gnu/packages/crates-io.scm (nitrokey-app): New variable.

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 1188df5348..d7e39ad475 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -781,6 +781,36 @@  (define-public cppcodec
 encode/decode base64, base64url, base32, base32hex and hex.")
     (license license:expat)))
 
+(define-public nitrokey-app
+  (package
+    (name "nitrokey-app")
+    (version "1.4.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Nitrokey/nitrokey-app")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1imbvaf0yncz36ckjr99x94jwg2hnid49hsiqlxsv7ccxgk058bk"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f)) ;no test suite
+    (native-inputs (list pkg-config qttools))
+    (inputs (list cppcodec
+                  hidapi
+                  libnitrokey
+                  libusb
+                  qtbase-5
+                  qtsvg))
+    (home-page "https://github.com/Nitrokey/nitrokey-app")
+    (synopsis "GUI tool for Nitrokey devices")
+    (description
+     "This package provides GUI tool that interfaces with Nitrokey Pro
+v0.7/v0.8 and Nitrokey Storage devices.")
+    (license license:gpl3+)))
+
 (define-public nitrocli
   (package
     (name "nitrocli")
-- 
2.34.0