2020-06-18 07:14:14 -07:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, libusb1, libyubikey, json_c }:
|
2014-10-24 16:36:51 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "yubikey-personalization";
|
2019-07-03 12:45:02 -07:00
|
|
|
version = "1.20.0";
|
2014-10-24 16:36:51 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${version}.tar.gz";
|
2019-07-03 12:45:02 -07:00
|
|
|
sha256 = "14wvlwqnwj0gllkpvfqiy8ns938bwvjsz8x1hmymmx32m074vj0f";
|
2014-10-24 16:36:51 -07:00
|
|
|
};
|
|
|
|
|
2020-06-18 07:14:14 -07:00
|
|
|
patches = [
|
|
|
|
# remove after updating to next release
|
|
|
|
(fetchpatch {
|
|
|
|
name = "json-c-0.14-support.patch";
|
|
|
|
url = "https://github.com/Yubico/yubikey-personalization/commit/0aa2e2cae2e1777863993a10c809bb50f4cde7f8.patch";
|
|
|
|
sha256 = "1wnigf3hbq59i15kgxpq3pwrl1drpbj134x81mmv9xm1r44cjva8";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-09-22 11:10:11 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2020-04-24 14:42:01 -07:00
|
|
|
buildInputs = [ libusb1 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; {
|
2020-03-31 18:11:51 -07:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|