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

yandex-music: 5.18.2 -> 5.23.2 (#350288)

parents 4817ca2a 498a93a6
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
{
  "branch": "master",
  "commit_hash": "d446a98850abccfe28a78363c96468a2a8109cfc",
  "commit_message": "Update packages",
  "date": "2024-09-22",
  "tag": "v5.18.2"
}
+6 −6
Original line number Diff line number Diff line
@@ -14,13 +14,13 @@
}:
stdenvNoCC.mkDerivation rec {
  pname = "yandex-music";
  version = "5.18.2";
  version = "5.23.2";

  src = fetchFromGitHub {
    owner = "cucumber-sp";
    repo = "yandex-music-linux";
    rev = "v${version}";
    hash = "sha256-y+T2ckrnhrOiiPKBUlnvDb4FwrIfbaIXwVi16AoX/bQ=";
    hash = "sha256-nhy4D2PgTMsQOs8hPY39Z+I+Tldgf1ASZbatfxWqNTw=";
  };

  nativeBuildInputs = [
@@ -38,8 +38,8 @@ stdenvNoCC.mkDerivation rec {
      ym_info = builtins.fromJSON (builtins.readFile ./ym_info.json);
    in
    fetchurl {
      url = ym_info.ym.exe_link;
      sha256 = ym_info.ym.exe_sha256;
      url = ym_info.exe_link;
      hash = ym_info.exe_hash;
    };

  buildPhase = ''
@@ -77,10 +77,10 @@ stdenvNoCC.mkDerivation rec {
  '';

  meta = {
    description = "Yandex Music - Personal recommendations, selections for any occasion and new music";
    description = "Personal recommendations, selections for any occasion and new music";
    homepage = "https://music.yandex.ru/";
    downloadPage = "https://music.yandex.ru/download/";
    changelog = "https://github.com/cucumber-sp/yandex-music-linux/releases/tag/v5.13.2";
    changelog = "https://github.com/cucumber-sp/yandex-music-linux/releases/tag/v${version}";
    license = lib.licenses.unfree;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ shved ];
+16 −14
Original line number Diff line number Diff line
@@ -11,15 +11,10 @@ RAW="https://raw.githubusercontent.com/$OWNER/$REPO"
latest_release="$(curl --silent "$URL/releases/latest")"
latest_tag="$(curl --silent "$URL/tags?per_page=1")"
commit_hash="$(jq -r '.[0].commit.sha' <<<"$latest_tag")"
latest_commit="$(curl --silent "$URL/commits/$commit_hash"'')"
commit_message="$(jq -r '.commit.message' <<<"$latest_commit")"

tag=$(jq -r '.tag_name' <<<"$latest_release")
# drop 'v' prefix
version="${tag#v}"

branch=$(jq -r '.target_commitish' <<<"$latest_release")

date=$(jq -r '.created_at' <<<"$latest_release")
# truncate time
date=${date%T*}
@@ -30,14 +25,21 @@ update-source-version yandex-music "$version" --ignore-same-hash
# set yandex-music dir
dir="pkgs/by-name/ya/yandex-music"

echo -e '{
  "branch": "'"$branch"'",
  "commit_hash": "'"$commit_hash"'",
  "commit_message": "'"$commit_message"'",
  "date": "'"$date"'",
  "tag": "'"$tag"'"
}' >"$dir/info.json" || echo "Please run the script in the root of the Nixpkgs repo"
# download and save new version of 'exe' file
ym_info=$(curl --silent "$RAW/$commit_hash/utility/version_info.json" |\
    jq '.ym')

exe_name="$(jq -r '.exe_name' <<<"$ym_info")"
exe_link="$(jq -r '.exe_link' <<<"$ym_info")"
exe_sha256="$(jq -r '.exe_sha256' <<<"$ym_info")"
exe_hash="$(nix-hash --to-sri --type sha256  "$exe_sha256")"

curl --silent "$RAW/$commit_hash/utility/version_info.json" |\
        jq . > "$dir/ym_info.json" ||\
jq '.' > "$dir/ym_info.json" <<- EOJSON ||\
        echo "Please run the script in the root of the Nixpkgs repo"
{
    "version": "$version",
    "exe_name": "$exe_name",
    "exe_link": "$exe_link",
    "exe_hash": "$exe_hash"
}
EOJSON
+4 −12
Original line number Diff line number Diff line
{
  "ym": {
    "version": "5.18.2",
    "exe_name": "Yandex_Music_x64_5.18.2.exe",
    "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.18.2.exe",
    "exe_sha256": "a513eb6aa4bd05bae8503f5578a8e91d778794ffe4eb3a450040903570106941"
  },
  "electron": {
    "version": "29.4.6",
    "x64": "https://github.com/electron/electron/releases/download/v29.4.6/electron-v29.4.6-linux-x64.zip",
    "armv7l": "https://github.com/electron/electron/releases/download/v29.4.6/electron-v29.4.6-linux-armv7l.zip",
    "arm64": "https://github.com/electron/electron/releases/download/v29.4.6/electron-v29.4.6-linux-arm64.zip"
  }
  "version": "5.23.2",
  "exe_name": "Yandex_Music_x64_5.23.2.exe",
  "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.23.2.exe",
  "exe_hash": "sha256-PhXmUGV9+9zfRZufw3FVvpPGqVLAB51lrz7KJovm+C8="
}