Unverified Commit e1dd56a6 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

anytype: add commandLineArgs (#341140)

parents ff3b0307 9784dc0a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
{ lib, fetchurl, appimageTools, makeWrapper }:
{ lib, fetchurl, appimageTools, makeWrapper, commandLineArgs ? "" }:

let
  pname = "anytype";
@@ -17,7 +17,8 @@ in appimageTools.wrapType2 {
  extraInstallCommands = ''
    source "${makeWrapper}/nix-support/setup-hook"
    wrapProgram $out/bin/${pname} \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
      --add-flags ${lib.escapeShellArg commandLineArgs}
    install -m 444 -D ${appimageContents}/anytype.desktop -t $out/share/applications
    substituteInPlace $out/share/applications/anytype.desktop \
      --replace 'Exec=AppRun' 'Exec=${pname}'