python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / yubikey-personalization-gui / default.nix
blob66f43ad9bfcacda426596928e2c754f166d1aeb8
1 { stdenv, lib, fetchurl, mkDerivation, pkg-config, qtbase, qmake, imagemagick
2 , libyubikey, yubikey-personalization }:
4 mkDerivation rec {
5   pname = "yubikey-personalization-gui";
6   version = "3.1.25";
8   src = fetchurl {
9     url = "https://developers.yubico.com/yubikey-personalization-gui/Releases/yubikey-personalization-gui-${version}.tar.gz";
10     sha256 = "1knyv5yss8lhzaff6jpfqv12fjf1b8b21mfxzx3qi0hw4nl8n2v8";
11   };
13   nativeBuildInputs = [ pkg-config qmake imagemagick ];
14   buildInputs = [ yubikey-personalization qtbase libyubikey ];
16   installPhase = ''
17     install -D -m0755 build/release/yubikey-personalization-gui "$out/bin/yubikey-personalization-gui"
18     install -D -m0644 resources/lin/yubikey-personalization-gui.1 "$out/share/man/man1/yubikey-personalization-gui.1"
20     # Desktop files
21     install -D -m0644 resources/lin/yubikey-personalization-gui.desktop "$out/share/applications/yubikey-personalization-gui.desktop"
23     # Icons
24     install -D -m0644 resources/lin/yubikey-personalization-gui.xpm "$out/share/pixmaps/yubikey-personalization-gui.xpm"
25     install -D -m0644 resources/lin/yubikey-personalization-gui.png "$out/share/icons/hicolor/128x128/apps/yubikey-personalization-gui.png"
26     for SIZE in 16 24 32 48 64 96; do
27       # set modify/create for reproducible builds
28       convert -scale ''${SIZE} +set date:create +set date:modify \
29         resources/lin/yubikey-personalization-gui.png \
30         yubikey-personalization-gui.png
32       install -D -m0644 yubikey-personalization-gui.png "$out/share/icons/hicolor/''${SIZE}x''${SIZE}/apps/yubikey-personalization-gui.png"
33     done
34   '';
36   meta = with lib; {
37     broken = stdenv.isDarwin;
38     homepage = "https://developers.yubico.com/yubikey-personalization-gui";
39     description = "A QT based cross-platform utility designed to facilitate reconfiguration of the Yubikey";
40     license = licenses.bsd2;
41     platforms = platforms.unix;
42   };