Make postman and beekeeper compatible with NIXOS_OZONE_WL
This commit is contained in:
parent
53204fe466
commit
5c3a366f0c
@ -1,4 +1,4 @@
|
||||
{ lib, fetchurl, appimageTools, pkgs }:
|
||||
{ lib, fetchurl, appimageTools, pkgs, makeWrapper }:
|
||||
|
||||
let
|
||||
pname = "beekeeper-studio";
|
||||
@ -23,11 +23,15 @@ appimageTools.wrapType2 {
|
||||
|
||||
extraInstallCommands = ''
|
||||
ln -s $out/bin/${name} $out/bin/${pname}
|
||||
source "${makeWrapper}/nix-support/setup-hook"
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
||||
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||
install -m 444 -D ${appimageContents}/${pname}.png \
|
||||
$out/share/icons/hicolor/512x512/apps/${pname}.png
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -41,6 +41,7 @@
|
||||
, version
|
||||
, meta
|
||||
, copyDesktopItems
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
@ -129,6 +130,10 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/bin
|
||||
ln -s $out/share/postman/postman $out/bin/postman
|
||||
|
||||
source "${makeWrapper}/nix-support/setup-hook"
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
||||
|
||||
mkdir -p $out/share/icons/hicolor/128x128/apps
|
||||
ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/postman.png
|
||||
ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/hicolor/128x128/apps/postman.png
|
||||
|
Loading…
Reference in New Issue
Block a user