12 electronArguments ? "",
15 stdenvNoCC.mkDerivation rec {
16 pname = "yandex-music";
19 src = fetchFromGitHub {
20 owner = "cucumber-sp";
21 repo = "yandex-music-linux";
23 hash = "sha256-y+T2ckrnhrOiiPKBUlnvDb4FwrIfbaIXwVi16AoX/bQ=";
34 passthru.updateScript = ./update.sh;
38 ym_info = builtins.fromJSON (builtins.readFile ./ym_info.json);
41 url = ym_info.ym.exe_link;
42 sha256 = ym_info.ym.exe_sha256;
47 bash "./repack.sh" -o "./app" "$ymExe"
54 mkdir -p "$out/share/nodejs"
55 mv app/yandex-music.asar "$out/share/nodejs"
57 CONFIG_FILE="$out/share/yandex-music.conf"
58 echo "TRAY_ENABLED=${if trayEnabled then "1" else "0"}" >> "$CONFIG_FILE"
59 echo "ELECTRON_ARGS=\"${electronArguments}\"" >> "$CONFIG_FILE"
62 install -Dm755 "$src/templates/yandex-music.sh" "$out/bin/yandex-music"
63 substituteInPlace "$out/bin/yandex-music" \
64 --replace-fail "%electron_path%" "${electron}/bin/electron" \
65 --replace-fail "%asar_path%" "$out/share/nodejs/yandex-music.asar"
67 wrapProgram "$out/bin/yandex-music" \
68 --set-default YANDEX_MUSIC_CONFIG "$CONFIG_FILE"
70 install -Dm644 "./app/favicon.png" "$out/share/pixmaps/yandex-music.png"
71 install -Dm644 "./app/favicon.png" "$out/share/icons/hicolor/48x48/apps/yandex-music.png"
72 install -Dm644 "./app/favicon.svg" "$out/share/icons/hicolor/scalable/apps/yandex-music.svg"
74 install -Dm644 "$src/templates/desktop" "$out/share/applications/yandex-music.desktop"
80 description = "Yandex Music - Personal recommendations, selections for any occasion and new music";
81 homepage = "https://music.yandex.ru/";
82 downloadPage = "https://music.yandex.ru/download/";
83 changelog = "https://github.com/cucumber-sp/yandex-music-linux/releases/tag/v5.13.2";
84 license = lib.licenses.unfree;
85 platforms = lib.platforms.linux;
86 maintainers = with lib.maintainers; [ shved ];