1 { lib, stdenv, fetchurl, pkg-config, openssl, check, pcsclite, PCSC, gengetopt, cmake
2 , withApplePCSC ? stdenv.isDarwin
5 stdenv.mkDerivation rec {
6 pname = "yubico-piv-tool";
10 url = "https://developers.yubico.com/yubico-piv-tool/Releases/yubico-piv-tool-${version}.tar.gz";
11 hash = "sha256-oCoS2VRdHvehuZhgbYm3tlWl9aFDdzbPUdsIP4dvVak=";
15 substituteInPlace CMakeLists.txt --replace "-Werror" ""
18 nativeBuildInputs = [ pkg-config cmake gengetopt ];
19 buildInputs = [ openssl check ]
20 ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]);
23 "-DGENERATE_MAN_PAGES=OFF" # Use the man page generated at release time
24 "-DCMAKE_INSTALL_BINDIR=bin"
25 "-DCMAKE_INSTALL_INCLUDEDIR=include"
26 "-DCMAKE_INSTALL_MANDIR=share/man"
27 "-DCMAKE_INSTALL_LIBDIR=lib"
30 configureFlags = [ "--with-backend=${if withApplePCSC then "macscard" else "pcsc"}" ];
33 homepage = "https://developers.yubico.com/yubico-piv-tool/";
35 Used for interacting with the Privilege and Identification Card (PIV)
36 application on a YubiKey
39 The Yubico PIV tool is used for interacting with the Privilege and
40 Identification Card (PIV) application on a YubiKey.
41 With it you may generate keys on the device, importing keys and
42 certificates, and create certificate requests, and other operations.
43 A shared library and a command-line tool is included.
45 license = licenses.bsd2;
46 platforms = platforms.all;
47 maintainers = with maintainers; [ viraptor anthonyroussel ];