2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchurl, mkDerivation, pkg-config, qtbase, qmake, imagemagick
|
2019-08-11 20:55:36 +01:00
|
|
|
, libyubikey, yubikey-personalization }:
|
2014-10-25 00:37:22 +01:00
|
|
|
|
2019-08-03 12:18:40 +01:00
|
|
|
mkDerivation rec {
|
2021-08-02 10:38:45 +01:00
|
|
|
pname = "yubikey-personalization-gui";
|
|
|
|
version = "3.1.25";
|
2014-10-25 00:37:22 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-02 10:38:45 +01:00
|
|
|
url = "https://developers.yubico.com/yubikey-personalization-gui/Releases/yubikey-personalization-gui-${version}.tar.gz";
|
2018-02-28 03:22:50 +00:00
|
|
|
sha256 = "1knyv5yss8lhzaff6jpfqv12fjf1b8b21mfxzx3qi0hw4nl8n2v8";
|
2014-10-25 00:37:22 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config qmake imagemagick ];
|
2018-05-04 22:07:40 +01:00
|
|
|
buildInputs = [ yubikey-personalization qtbase libyubikey ];
|
2019-01-26 10:01:09 +00:00
|
|
|
|
2014-10-25 00:37:22 +01:00
|
|
|
installPhase = ''
|
2019-08-11 20:55:36 +01:00
|
|
|
install -D -m0755 build/release/yubikey-personalization-gui "$out/bin/yubikey-personalization-gui"
|
|
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.1 "$out/share/man/man1/yubikey-personalization-gui.1"
|
|
|
|
|
|
|
|
# Desktop files
|
|
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.desktop "$out/share/applications/yubikey-personalization-gui.desktop"
|
|
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.desktop "$out/share/pixmaps/yubikey-personalization-gui.xpm"
|
|
|
|
|
|
|
|
# Icons
|
|
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.png "$out/share/icons/hicolor/128x128/apps/yubikey-personalization-gui.png"
|
|
|
|
for SIZE in 16 24 32 48 64 96; do
|
|
|
|
# set modify/create for reproducible builds
|
|
|
|
convert -scale ''${SIZE} +set date:create +set date:modify \
|
|
|
|
resources/lin/yubikey-personalization-gui.png \
|
|
|
|
yubikey-personalization-gui.png
|
|
|
|
|
|
|
|
install -D -m0644 yubikey-personalization-gui.png "$out/share/icons/hicolor/''${SIZE}x''${SIZE}/apps/yubikey-personalization-gui.png"
|
|
|
|
done
|
2014-10-25 00:37:22 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://developers.yubico.com/yubikey-personalization-gui";
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "A QT based cross-platform utility designed to facilitate reconfiguration of the Yubikey";
|
2014-10-25 00:37:22 +01:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|