2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchurl, mkDerivation, pkg-config, qtbase, qmake, imagemagick
|
2019-08-11 19:55:36 +00:00
|
|
|
, libyubikey, yubikey-personalization }:
|
2014-10-24 23:37:22 +00:00
|
|
|
|
2019-08-03 11:18:40 +00:00
|
|
|
mkDerivation rec {
|
2018-02-28 03:22:50 +00:00
|
|
|
name = "yubikey-personalization-gui-3.1.25";
|
2014-10-24 23:37:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/yubikey-personalization-gui/Releases/${name}.tar.gz";
|
2018-02-28 03:22:50 +00:00
|
|
|
sha256 = "1knyv5yss8lhzaff6jpfqv12fjf1b8b21mfxzx3qi0hw4nl8n2v8";
|
2014-10-24 23:37:22 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config qmake imagemagick ];
|
2018-05-04 21:07:40 +00:00
|
|
|
buildInputs = [ yubikey-personalization qtbase libyubikey ];
|
2019-01-26 10:01:09 +00:00
|
|
|
|
2014-10-24 23:37:22 +00:00
|
|
|
installPhase = ''
|
2019-08-11 19:55:36 +00: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-24 23:37:22 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://developers.yubico.com/yubikey-personalization-gui";
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "A QT based cross-platform utility designed to facilitate reconfiguration of the Yubikey";
|
2014-10-24 23:37:22 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|