2022-05-28 13:22:26 +00:00
|
|
|
{ stdenv, 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 {
|
2021-08-02 09:38:45 +00:00
|
|
|
pname = "yubikey-personalization-gui";
|
|
|
|
version = "3.1.25";
|
2014-10-24 23:37:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-02 09:38:45 +00: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-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"
|
|
|
|
|
|
|
|
# Icons
|
2022-06-28 06:59:09 +00:00
|
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.xpm "$out/share/pixmaps/yubikey-personalization-gui.xpm"
|
2019-08-11 19:55:36 +00:00
|
|
|
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; {
|
2022-05-28 13:22:26 +00:00
|
|
|
broken = stdenv.isDarwin;
|
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 = "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;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "yubikey-personalization-gui";
|
2014-10-24 23:37:22 +00:00
|
|
|
};
|
|
|
|
}
|