dopamine: respect NIXOS_OZONE_WL (#460013)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
fetchurl,
|
||||
appimageTools,
|
||||
nix-update-script,
|
||||
makeWrapper,
|
||||
}:
|
||||
appimageTools.wrapType2 rec {
|
||||
pname = "dopamine";
|
||||
@@ -13,11 +14,16 @@ appimageTools.wrapType2 rec {
|
||||
hash = "sha256-kvXan5J+rxJ/ugcEz9xytq3eQG0saWrYZjF7O1d6rTA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
extraInstallCommands =
|
||||
let
|
||||
contents = appimageTools.extract { inherit pname version src; };
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
|
||||
|
||||
install -Dm644 ${contents}/dopamine.desktop $out/share/applications/dopamine.desktop
|
||||
substituteInPlace $out/share/applications/dopamine.desktop \
|
||||
--replace-fail 'Exec=AppRun' 'Exec=dopamine'
|
||||
|
||||
Reference in New Issue
Block a user