diff options
author | Aleksana <me@aleksana.moe> | 2024-05-31 22:35:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 22:35:56 +0800 |
commit | 417df303abe946a8d167833a9ac541932bdd99a7 (patch) | |
tree | 0d060c915358da38e7566225c9e089a26d98242c /pkgs/by-name/lu | |
parent | 307d0363484f506d2d1cfcf91433b4fa90113b2a (diff) | |
parent | 4aadb47dd5fe3309f2c3ee42b90af985f6ee6c46 (diff) |
Merge pull request #312928 from eliandoran/dev/lunacy-fix-toast
lunacy: fix "Unsupported file format" toast at startup
Diffstat (limited to 'pkgs/by-name/lu')
-rw-r--r-- | pkgs/by-name/lu/lunacy/package.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/by-name/lu/lunacy/package.nix b/pkgs/by-name/lu/lunacy/package.nix index f26a50af92eae..8f55e067126d2 100644 --- a/pkgs/by-name/lu/lunacy/package.nix +++ b/pkgs/by-name/lu/lunacy/package.nix @@ -14,6 +14,7 @@ , libXcursor , openssl , imagemagick +, makeWrapper }: stdenv.mkDerivation (finalAttrs: { @@ -47,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ dpkg autoPatchelfHook + makeWrapper ]; # adds to the RPATHS of all shared objects (exe and libs) @@ -82,22 +84,22 @@ stdenv.mkDerivation (finalAttrs: { # Prepare the desktop icon, the upstream icon is 200x200 but the hicolor theme does not # support this resolution. Nearest sizes are 192x192 and 256x256. ${imagemagick}/bin/convert "opt/icons8/lunacy/Assets/LunacyLogo.png" -resize 192x192 lunacy.png - install -D lunacy.png "$out/share/icons/hicolor/192x192/apps/${finalAttrs.pname}.png" + install -D lunacy.png "$out/share/icons/hicolor/192x192/apps/lunacy.png" runHook postInstall ''; postInstall = '' substituteInPlace $out/share/applications/lunacy.desktop \ - --replace "Exec=/opt/icons8/lunacy/Lunacy" "Exec=${finalAttrs.pname}" \ - --replace "Icon=/opt/icons8/lunacy/Assets/LunacyLogo.png" "Icon=${finalAttrs.pname}" + --replace "Exec=/opt/icons8/lunacy/Lunacy" "Exec=lunacy" \ + --replace "Icon=/opt/icons8/lunacy/Assets/LunacyLogo.png" "Icon=lunacy" ''; postFixup = '' mkdir $out/bin - # Fixes runtime error regarding missing libSkiaSharp.so (which is in the same directory as the binary). - ln -s "$out/lib/lunacy/Lunacy" "$out/bin/${finalAttrs.pname}" + # The wrapper is needed instead of a symlink to prevent a random "Unsupported file format" when running the app. + makeWrapper "$out/lib/lunacy/Lunacy" "$out/bin/lunacy" ''; meta = with lib; { |