mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
yubikey-manager-qt: fix application icons
Copy the icons into the canonical XDG icon folders and autogenerate smaller sizes from the main icon file.
This commit is contained in:
parent
b90fa9940b
commit
403e43366c
@ -1,6 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, imagemagick
|
||||||
, pcsclite
|
, pcsclite
|
||||||
, pyotherside
|
, pyotherside
|
||||||
, python3
|
, python3
|
||||||
@ -24,6 +25,7 @@ mkDerivation rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
python3.pkgs.wrapPython
|
python3.pkgs.wrapPython
|
||||||
qmake
|
qmake
|
||||||
|
imagemagick
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -43,10 +45,25 @@ mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dt $out/share/applications resources/ykman-gui.desktop
|
# Desktop files
|
||||||
install -Dt $out/share/ykman-gui/icons resources/icons/*.{icns,ico,png,xpm}
|
install -D -m0644 resources/ykman-gui.desktop "$out/share/applications/ykman-gui.desktop"
|
||||||
substituteInPlace $out/share/applications/ykman-gui.desktop \
|
substituteInPlace "$out/share/applications/ykman-gui.desktop" \
|
||||||
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui"
|
--replace Exec=ykman-gui "Exec=$out/bin/ykman-gui"
|
||||||
|
|
||||||
|
# Icons
|
||||||
|
install -Dt $out/share/ykman-gui/icons resources/icons/*.{icns,ico}
|
||||||
|
install -D -m0644 resources/icons/ykman.png "$out/share/icons/hicolor/128x128/apps/ykman.png"
|
||||||
|
ln -s -- "$out/share/icons/hicolor/128x128/apps/ykman.png" "$out/share/icons/hicolor/128x128/apps/ykman-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/icons/ykman.png ykman.png
|
||||||
|
|
||||||
|
imageFolder="$out/share/icons/hicolor/''${SIZE}x''${SIZE}/apps"
|
||||||
|
install -D -m0644 ykman.png "$imageFolder/ykman.png"
|
||||||
|
ln -s -- "$imageFolder/ykman.png" "$imageFolder/ykman-gui.png"
|
||||||
|
done
|
||||||
|
unset SIZE imageFolder
|
||||||
'';
|
'';
|
||||||
|
|
||||||
qtWrapperArgs = [
|
qtWrapperArgs = [
|
||||||
|
Loading…
Reference in New Issue
Block a user