Unverified Commit b62e4086 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

yandex-music: 5.39.0 -> 5.46.0 (#388179)

parents 21c17995 4b752c19
Loading
Loading
Loading
Loading
+39 −5
Original line number Diff line number Diff line
@@ -10,17 +10,32 @@
  electron,
  fetchFromGitHub,
  electronArguments ? "",

  # Whether to enable tray menu by default
  trayEnabled ? true,
  # Style of tray: 1 - default style, 2 - mono black, 3 - mono white
  trayStyle ? 1,
  # Whether to leave application in tray disregarding of its play state
  trayAlways ? false,
  # Whether to enable developers tools
  devTools ? false,
  # Vibe animation FPS can be  from 0 (black screen) to any reasonable number.
  # Recommended 25 - 144. Default 25.
  vibeAnimationMaxFps ? 25,
  # Yandex Music's custom Windows-styled titlebar. Also makes the window frameless.
  customTitleBar ? false,
}:
assert lib.assertMsg (trayStyle >= 1 && trayStyle <= 3) "Tray style must be withing 1 and 3";
assert lib.assertMsg (vibeAnimationMaxFps >= 0) "Vibe animation max FPS must be greater then 0";
stdenvNoCC.mkDerivation rec {
  pname = "yandex-music";
  version = "5.39.0";
  version = "5.46.0";

  src = fetchFromGitHub {
    owner = "cucumber-sp";
    repo = "yandex-music-linux";
    rev = "v${version}";
    hash = "sha256-oEbbQRqvnK521N3Kerv18h1frVLbioFeHfb/FCkHC6Y=";
    hash = "sha256-JyDpJCNHmPV1l9+//3sgJGkD+pewuoAb33hgTUi5Ukc=";
  };

  nativeBuildInputs = [
@@ -48,6 +63,27 @@ stdenvNoCC.mkDerivation rec {
    runHook postBuild
  '';

  config =
    let
      inherit (lib) optionalString;
    in
    ''
      ELECTRON_ARGS="${electronArguments}"
      VIBE_ANIMATION_MAX_FPS=${toString vibeAnimationMaxFps}
    ''
    + optionalString trayEnabled ''
      TRAY_ENABLED=${toString trayStyle}
    ''
    + optionalString trayAlways ''
      ALWAYS_LEAVE_TO_TRAY=1
    ''
    + optionalString devTools ''
      DEV_TOOLS=1
    ''
    + optionalString customTitleBar ''
      CUSTOM_TITLE_BAR=1
    '';

  installPhase = ''
    runHook preInstall

@@ -55,9 +91,7 @@ stdenvNoCC.mkDerivation rec {
    mv app/yandex-music.asar "$out/share/nodejs"

    CONFIG_FILE="$out/share/yandex-music.conf"
    echo "TRAY_ENABLED=${if trayEnabled then "1" else "0"}" >> "$CONFIG_FILE"
    echo "ELECTRON_ARGS=\"${electronArguments}\"" >> "$CONFIG_FILE"

    echo "$config" >> "$CONFIG_FILE"

    install -Dm755 "$src/templates/yandex-music.sh" "$out/bin/yandex-music"
    substituteInPlace "$out/bin/yandex-music"                                  \
+4 −4
Original line number Diff line number Diff line
{
  "version": "5.39.0",
  "exe_name": "Yandex_Music_x64_5.39.0.exe",
  "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.39.0.exe",
  "exe_hash": "sha256-jOaxKDOkabsNQTXH5+UGwfdL+Srjm5gjQgHe/YuGiaQ="
  "version": "5.46.0",
  "exe_name": "Yandex_Music_x64_5.46.0.exe",
  "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.46.0.exe",
  "exe_hash": "sha256-gvdJ/ucPeSG/oSD6ullFzWdRYzu0ovxo0qK8ZjLHi+g="
}