Unverified Commit 86bd0597 authored by Naïm Camille Favier's avatar Naïm Camille Favier Committed by GitHub
Browse files

discord: add commandLineArgs (#422964)

parents 5da7e667 0025e0ec
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
  vencord,
  withMoonlight ? false,
  moonlight,
  commandLineArgs ? "",
}:

assert lib.assertMsg (
@@ -64,7 +65,8 @@ stdenv.mkDerivation {
    # wrap executable to $out/bin
    mkdir -p $out/bin
    makeWrapper "$out/Applications/${desktopName}.app/Contents/MacOS/${binaryName}" "$out/bin/${binaryName}" \
      --run ${lib.getExe disableBreakingUpdates}
      --run ${lib.getExe disableBreakingUpdates} \
      --add-flags ${lib.escapeShellArg commandLineArgs}

    runHook postInstall
  '';
+3 −1
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@
  # The intended use-case for this is when SKIP_HOST_UPDATE is enabled via other means,
  # for example if a settings.json is linked declaratively (e.g., with home-manager).
  disableUpdates ? true,
  commandLineArgs ? "",
}:
assert lib.assertMsg (
  !(withMoonlight && withVencord)
@@ -182,7 +183,8 @@ stdenv.mkDerivation rec {
        ${lib.strings.optionalString enableAutoscroll "--add-flags \"--enable-blink-features=MiddleClickAutoscroll\""} \
        --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
        --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${binaryName} \
        ${lib.strings.optionalString disableUpdates "--run ${lib.getExe disableBreakingUpdates}"}
        ${lib.strings.optionalString disableUpdates "--run ${lib.getExe disableBreakingUpdates}"} \
        --add-flags ${lib.escapeShellArg commandLineArgs}

    ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
    # Without || true the install would fail on case-insensitive filesystems