2014-10-25 00:36:51 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libusb, libyubikey, json_c }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "yubikey-personalization-${version}";
|
2016-03-20 18:48:49 +00:00
|
|
|
version = "1.17.3";
|
2014-10-25 00:36:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${version}.tar.gz";
|
2016-03-20 18:48:49 +00:00
|
|
|
sha256 = "034wmwinxmngji1ly8nm9q4hg194iwk164y5rw0whnf69ycc6bs8";
|
2014-10-25 00:36:51 +01:00
|
|
|
};
|
|
|
|
|
2015-09-22 19:10:11 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libusb libyubikey json_c ];
|
2014-10-25 00:36:51 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-backend=libusb-1.0"
|
|
|
|
];
|
|
|
|
|
2016-05-08 19:52:09 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-03-18 18:16:24 +00:00
|
|
|
postInstall = ''
|
2016-05-08 19:52:09 +01:00
|
|
|
# Don't use 70-yubikey.rules because it depends on ConsoleKit
|
2016-05-09 13:16:58 +01:00
|
|
|
install -D -t $out/lib/udev/rules.d 69-yubikey.rules
|
2015-03-18 18:16:24 +00:00
|
|
|
'';
|
|
|
|
|
2014-10-25 00:36:51 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://developers.yubico.com/yubikey-personalization;
|
|
|
|
description = "a library and command line tool to personalize YubiKeys";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ wkennington ];
|
|
|
|
};
|
|
|
|
}
|