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